[Haskell-beginners] Simple UTF-8 output

Christopher Howard christopher.howard at frigidcode.com
Sat May 28 19:58:07 CEST 2011


On 05/28/2011 08:56 AM, Elvio Toccalino wrote:
> In case your ini file is not the problem, check the output of your
> conversion piped (mentioned in the other mail: Data.Text.IO.putStrLn $
> Data.Text.Encodings.decodeUtf8 $ bytestringResult) using decodeASCII,
> just to see what comes out.
> 
> BTW, the \xe6 is the UTF8 code for the small letter AE, which I'm
> guessing is not something you'd use in a query string :P 
> Unless you're storing some very cosmopolitan data in your database, I¿d
> say someone is messing your codes. So far, this hasn't happened to me
> using the Haskell libraries recommended here.
> 

Actually, e6 was the correct UTF-8 hex value (ligature æ). Used as part
of a book title.

To be honest, I finally gave up on Database.HDBC.ODBC and tried the
experimental Database.HDBC.MySQL. So far it appears to be getting the
Unicode right.

-- 
frigidcode.com
theologia.indicium.us



More information about the Beginners mailing list