[Haskell-cafe] accents

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed Mar 24 06:13:45 EDT 2010

Dupont Corentin <corentin.dupont at gmail.com> writes:
>> a <- readFile "list.txt"
>> head $ lines a
> "abn\233gation"
> putStrLn displays a strange character for the "é".

That is the escaped form of é.  You have several options:

1) Use the utf8-string package for I/O
2) Use the text package for I/O (and set an encoding)
3) GHC 6.12.1 uses the system's locale for encoding; as such if your
system normally lets you see accented characters then putStrLn,
etc. will print them out.

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list