I'm using LWP::UserAgent to get some pages from the web, by sometimes the decoded_content method of HTTP::Message crashes with an error 'utf8 "\x96" does not map to Unicode'. One of such pages is ttp://acus.org/new_atlanticist/sarkozy-delays-university-reforms-feared-greek-style-riots. Seems to me, it's because some of the characters, found on the page don't map to encoding, selected in decoded_content sub. If I use decoded_content(charset => 'none') (which basically means leaving the content encoded), the error disappears, but what I get is the message in an unknown encoding. For me some malformed characters don't matter, so a possible workaround would be get the body with decoded_content(charset => 'none') and than decode it itself using PERLQQ and at last use regex to delete them, but I don't want to copy the code reliable for encoding guessing from http::message. How would you suggest to solve this? TIA
PS: not sure if everything is clear, just try to fetch the mentioned page and use decoded_content on it