See the content-type header:
> HEAD http://www.georgewbush.com/News/Read.aspx?ID=2768 200 OK Cache-Control: private Connection: close Date: Thu, 24 Jun 2004 19:09:36 GMT Server: Microsoft-IIS/5.0 Content-Length: 55012 Content-Type: text/html; charset=utf-8 Client-Date: Thu, 24 Jun 2004 19:14:04 GMT Client-Peer: 65.172.163.121:80 Client-Response-Num: 1 Set-Cookie: ASP.NET_SessionId=kma4jj55oyrrn245ujknpdab; path=/ X-AspNet-Version: 1.1.4322 X-Powered-By: ASP.NET
It's UFT-8 encoded, and translating it back to ASCII might be lossy. See perlunicode and Encode::PerlIO for some pointers on how to handle unicode - you probably need a recent perl (at least 5.6, but preferably 5.8 or higher).

Joost.


In reply to Re: LWP::Simple returns strange encodings by Joost
in thread LWP::Simple returns strange encodings by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.