[Haskell] Unicode advice request
László Kálmán
kalman at nytud.hu
Fri Mar 14 19:58:14 EDT 2008
Dear Don,
thanks very much!
> You may need to write the strings to the database using the utf8-string
> package.
My program may not be the only one writing into the database. But I now
*read* from the database using utf8-string, which solves the problem:
import Codec.Binary.UTF8.String ( decodeString )
then (decodeString $ fromSql sqlString) returns the correct string.
Unfortunately, utf8-string is not part of my ghc distribution (6-6-1,
Ubuntu), and my repositories also don't contain it. I had to download
it from
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string-0.2
and install it by hand. (This may not be the optimal solution, though.)
[Of course, the charset=utf-8 content type was included in the header
from the outset.]
Best regards and thanks again for the immediate help -- L. Kalman
--
Laszlo Kalman Theoretical Linguistics Program,
kalman at nytud.hu Budapest University (ELTE)
Research Institute for Linguistics, Room 209
P.O. Box 701/518, 1399 Budapest, Hungary
(+36-1) 351 4830 x148, fax: (+36-1) 322 9297
http://budling.nytud.hu/~kalman
"Me die? That'll be the last thing I do!"
More information about the Haskell
mailing list