[racket] windows-1252 charset decoding

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 3 19:31:13 EST 2015

You can use "windows-1252" as an encoding name with, for example,
`reencode-input-port`:

 > (read-line (reencode-input-port (open-input-bytes #"\xA3") 
                                   "windows-1252"))
 "£"

For handling e-mail, see also `generalize-encoding` from `net/unihead`.

At Tue, 3 Mar 2015 16:22:26 -0800, John Clements wrote:
> I'm trying to process a bunch of e-mail, and I've discovered that lots of
> it is encoded using the "windows-1252" charset.  It looks pretty
> straightforward to map this to unicode, but I thought I'd check: has anyone
> written this code already?
> 
> John Clements
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users


Posted on the users mailing list.