LWP::Simple and utf8 problem

Joined
Apr 19, 2004
Messages
1
Reaction score
0
Hi,

I want to retrieve a webpage that includes unicode characters using the
LWP::Simple module. But how can I tell LWP::Simple which coding it should use as I haven't found anything concerning coding in the docs.

I use the following:

---
#!/usr/bin/perl -w

use strict;
use warnings;
use LWP::Simple;

my $file = "tmpfile";
my $url;

$url  = "http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?"; $url .= "db=Pubmed&retmax=500&id=15017969&retmode=xml";

getstore($url, $file);
exit;
-----

As it seems, the unicode characters are not correctly stored in the file. As I'm not very familiar with utf8 stuff, I'd like to ask for a hint on how to correctly store utf8-encoded webpages in a local file...!?

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

LWP::Simple and utf8 problem 1
SAX succeeds, but StAX fails 7
LWP and Unicode 51
LWP::Simple get() refined problem 6
LWP::Simple get() problem 0
utf8 and ftplib 5
LWP::Simple get() problem 1
MySql+UTF8 woes 0

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top