
20 May
2008
20 May
'08
2:43 a.m.
leaveye.guo:
Hi Haskellers:
I am a Chinese.
Mostly, it is needed to read/write UNICODE charactors.
Currently, I can only use the ByteString module in GHC 6, 2007. But I feel it is not an easy method.
Does GHC support it now ? or, is there any other way to do this ?
Regards
Hello! Chars in Haskell are 32 bit wide values, so they can happily accept various unicode encodings. The main issue then is doing IO with Chars. You can use either bytestrings, which will ignore any encoding, or the utf8-string package for Strings, which will properly encode and decode utf8 values to Char. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string -- Don