http://qs1969.pair.com?node_id=11133142


in reply to XML::Simple and ISO-8859-1 encoding buggy?

Off-the-wall suggestion: what happens if, instead of hand-decoding $xml, you

my $xml = $LWP_Data->{feed}->decoded_content;

I do not use XML::Simple, but a quick read seems to say that decoding (if any) is done by the back end. Maybe the back end (whatever it is) assumes that if you hand it a string that string has already been decoded?

Of course, this only works if the HTTP::Response object contains the encoding. You can check using lwp-request -m HEAD https://some.url/file.xml.