Parsing of undecoded UTF-16 error

L

livefreeordie

Hi - I'm using the following construct to parse an HTML page:

use HTTP::Request;
use LWP::UserAgent;

my $req = new HTTP::Request(GET=>$url);
my $ua = new LWP::UserAgent();
my $resp = $ua->request($req);
my $content = $resp->decoded_content();

I'm getting the following error when attempting to access this URL:

Error: Parsing of undecoded UTF-16 at C:/Perl/lib/LWP/Protocol.pm line
116.
URL: http://securities.stanford.edu/1009/RICKEL96/'

When I take a look at the content, each character is separated by a
newline or space.

What is this, and how can I get around it? I've retrieved other pages
successfully.

Jamie
 
M

Mumia W.

Hi - I'm using the following construct to parse an HTML page:

use HTTP::Request;
use LWP::UserAgent;

my $req = new HTTP::Request(GET=>$url);
my $ua = new LWP::UserAgent();
my $resp = $ua->request($req);
my $content = $resp->decoded_content();

I'm getting the following error when attempting to access this URL:

Error: Parsing of undecoded UTF-16 at C:/Perl/lib/LWP/Protocol.pm line
116.
URL: http://securities.stanford.edu/1009/RICKEL96/'

I don't get this with LWP::UserAgent 2.033 and HTTP::Request 1.40.
When I take a look at the content, each character is separated by a
newline or space.

The characters are separated by nulls. The file is in UTF16LE format;
however, this is not advertised in the HTTP header.

What is this, and how can I get around it? I've retrieved other pages
successfully.

Jamie

What version of Perl are you using? What module versions are you using?
 
L

livefreeordie

I don't get this with LWP::UserAgent 2.033 and HTTP::Request 1.40.


The characters are separated by nulls. The file is in UTF16LE format;
however, this is not advertised in the HTTP header.



What version of Perl are you using? What module versions are you using?- Hide quoted text -

- Show quoted text -

ActivePerl v5.8.8 built for MSWin32-x86-multi-thread
LWP::UserAgent version is 2.036
HTTP::Request version is 1.40

Thanks,
Jamie
 

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


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top