473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

LWP::Simple and utf8 problem

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

Jul 19 '05 #1
0 2069

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Woogie | last post by:
When running the sample code below without a proxy the GET returns the expected data. When run with the $proxy uncommented the GET returns the content of the login page for the site being...
2
by: john brown | last post by:
I'm using the following code to retrieve a web page. It seems that I'm able to pass the username and password to the web page, but it does nothing. Looking at the source code of the web page it...
6
by: Richard Bell | last post by:
I'm returning to Perl and Linux after many years away and while I know/knew way back when about Perl and Unix I'm new to this world today. I'm considering using LWP as the heart of a Web...
0
by: jnair | last post by:
from the perl man pages of LWP::Simple mirror($url, $file) Get and store a document identified by a URL, using If-modified- since, and checking the Content-Length. Returns the HTTP response...
0
by: sharif | last post by:
Anyone could help me out for n=my code ......I have written following code ,Here i m able to get and post the form successfuly..but after posting im not gettng proper response content... ...
8
by: pplers | last post by:
i wanted a script to check whether a premium account is still working or not, so i tried these: use LWP::Simple; open (IN, 'accounts.txt'); while (<IN>) { chomp; $user=substr($_,0,5);...
1
by: Freedolen | last post by:
Hi All, With the below code i am able to get the contents, but i need to get the filename whether it is 'index.html' or 'index.htm' or 'google.html'. How can i get it? use strict; use...
3
by: cketcham | last post by:
All, I have the following code: use 5.010; use LWP::UserAgent; use URI::URL; use LWP::Debug qw(+); my $browser = LWP::UserAgent->new();
1
by: dibyenduchatterjee | last post by:
Am using LWP module. I wish to read a page and print a part of it. I want t read first 300 characters of <div id="bodyContent"> written inside the html page. Code I am using : #!/usr/bin/perl...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.