Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

LWP and UTF-8: msg#00004

lang.perl.modules.lwp

Subject: LWP and UTF-8

Hi,

I am trying to use WWW::Mechanize against a site that is UTF-8 encoded. It seems to work ok, but I get error-messages about UTF-8 on STDERR. If I use LWP::Simple to download the page, the same message appears, so I assume that the problem is in LWP.

A simple test-program that shows the behaviour:
#!/usr/bin/perl -w
use strict;
use LWP::Simple qw/get/;
my $data = get( "https://www.trangselskatt.vv.se/cts/open/loginPrompt.do"; );

This program prints the following message to STDERR:

Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/share/perl5/LWP/Protocol.pm line 114.

Using WWW::Mechanize to access the site gives the same error-message from several different source-files.

The site works just fine in Firefox and it includes a charset-specification in the Content-Type:
mattias@rob:~/development/trangsel$ wget -S "https://www.trangselskatt.vv.se/cts/open/loginPrompt.do";
--19:29:39-- https://www.trangselskatt.vv.se/cts/open/loginPrompt.do
=> `loginPrompt.do.1'
Resolving www.trangselskatt.vv.se... 129.35.37.5
Connecting to www.trangselskatt.vv.se|129.35.37.5|:443... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Tue, 03 Jan 2006 18:29:26 GMT
Server: IBM_HTTP_Server
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Language: sv-SE
Length: unspecified [text/html]

[ <=> ] 5,302 --.--K/s

19:29:40 (82.63 KB/s) - `loginPrompt.do.1' saved [5302]

How can I avoid this error-message, both in LWP and in WWW::Mechanize? I am running perl 5.8.7, LWP 5.803 and WWW::Mechanize 1.12 on Debian testing.

/Mattias






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe