* Gisle Aas <[EMAIL PROTECTED]> [01/12/04 12:02]: > libwww-perl-5.802 is available from CPAN. The changes since 5.801 are: > > The HTTP::Message object now have a decoded_content() method. > This will return the content after any Content-Encodings and > charsets has been decoded. >
For some reason, the original content is killed in the response object when I use this method - the content() method returns an empty string after calling decoded_content. The reason appears to be passing $$content_ref to Encode::decode in line 220 of HTTP/Message.pm. I guess it's probably some problem with decode(), but in any case, replacing that line with my $cont = $$content_ref; $content_ref = \Encode::decode($charset, $cont, Encode::FB_CROAK()); Solved the problem. This is with HTTP::Message version 1.52, perl version 5.8.6, Encode version 2.08 on linux. Also, I would like to suggest adding a flag, which will cause the content() method to return the output of decoded_content(). This will allow scripts which ignored the charset to automatically do the right thing by simply setting this flag. Thanks, Moshe
pgpXZWbp3rgkH.pgp
Description: PGP signature