Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[LWP] Fix "Parsing of undecoded UTF-8" message

6 views
Skip to first unread message

adi...@gmail.com

unread,
May 6, 2008, 3:55:37 AM5/6/08
to
How can I fix "Parsing of undecoded UTF-8 will give garbage when
decoding entities at /usr/share/perl5/LWP/Protocol.pm line 114."

which I see every time when I use GET

LWP version - 5.805
Perl version - 5.8.8

in my code:


use utf8;
use encoding 'utf8';
use LWP::UserAgent;
...
my $response = $ua->get( $otrsTicketQueueUrl, 'Accept-Charset' =>
'utf-8', 'Accept-Language' => 'ru-ru');


I use $response->as_string to see all headers.
Server send data in utf-8, : 'Content-Type: text/html; charset=utf-8;'
but I see all string not in utf8, I can't read them.
Is there any way to fix this error, except use any recode modeuls for
content?

adi...@gmail.com

unread,
May 6, 2008, 4:45:11 AM5/6/08
to
Tried to add $ua->parse_head(0); but result was the same as previous.
Also, lwp-request gives normal output:

$ lwp-request -U -e https://otrs.ya****/otrs/index.pl?Action=AgentTicketQueue\&QueueID=22
Enter username for OTRS LogIn at otrs.ya***:443: adiakin
Password:


Parsing of undecoded UTF-8 will give garbage when decoding entities

at /usr/share/perl5/LWP/Protocol.pm line 114, <STDIN> line 2.
GET https://otrs.ya****/otrs/index.pl?Action=AgentTicketQueue&QueueID=22&Session=10483913c088fd7f3e3f6d87986d739506
Authorization: Basic YWRpYWtpbjo0NWVkeHM0NQ==

0 new messages