[Haskell-cafe] question about GHC and Unicode

Don Stewart dons at galois.com
Sun Apr 27 15:02:25 EDT 2008

>    In GHC there's a GHC.Unicode library, but for a string such as " *AIOO", a
>    GHC compiled program prints it as a string of unknown characters, and in
>    the interpreter, the string evaluates to a string of escape sequences
>    instead of displaying properly.
>    Is there a way to get/activate unicode support in GHC?

GHC supports unicode internally, and String and Char are all unicode.

To do unicode IO however, you need to use the utf8-string package:


Just import and use IO functions from System.IO.UTF8, and that's it!

-- Don

More information about the Haskell-Cafe mailing list