Syntactic Confectionery Delight | |
PerlMonks |
Chinese site and decoded_content() troubleby isync (Hermit) |
on Jun 08, 2007 at 19:12 UTC ( [id://620068]=perlquestion: print w/replies, xml ) | Need Help?? |
isync has asked for the wisdom of the Perl Monks concerning the following question:
utf-8 and lwp seems to be a constant struggle...
Why does this little script return an empty string? Anybody?? Using content() works but gives (at least in console) garbled data. Doing decode("utf8", $response->content) looks like doubly decoding. Some posts regarding decoded_content() on the usenet hint that decoded_content() might fail when the content isn't tagged properly with "encoding" etc. But strangely this page has a proper Content-Encoding header... So why does it fail? And how do I get it to work? Any help welcome!
Back to
Seekers of Perl Wisdom
|
|