utf-8 and lwp seems to be a constant struggle...
Why does this little script return an empty string? Anybody??
my $agent = LWP::UserAgent->new();
my $response = $agent->get('http://www.ku6.com/show/34D6sgY4X6w3YegR.h
print $response->decoded_content ."\n";
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!