Thank you Daniel and Ivan, with firefox i finded out that my text file
was encoded in WINDOWS-1252.
So a commande line such as:
iconv -f WINDOWS-1252 -t ISO-8859-1 liste.txt liste2.txt
did the trick.
Alternatively, i modified my code with:
myReadFile a = do
h - openFile a ReadMode
Hello,
i'm still struggling with ghci and accents.
Prelude é
\233
I've installed GHC 6.12.1, which gave me a better result:
Prelude putStrLn é
é
but still:
Prelude é
\233
I'm trying to search a file with french words with Regex, but i
stumble on accents:
*Main findRegexFile abnégation
[]
On Friday 07 May 2010 17:05:08, Dupont Corentin wrote:
Hello,
i'm still struggling with ghci and accents.
Prelude é
\233
That uses the Show instance of Char, which escapes all characters greater
than '\127' ('\DEL'), so that's no problem, jut inconvenient.
I've installed GHC 6.12.1,
Hello,
i have a list of french words with accents.
How could i handle them?
If i load them with ghci i get:
a - readFile list.txt
head $ lines a
abn\233gation
putStrLn displays a strange character for the é.
Cheers,
Corentin
___
Haskell-Cafe mailing
Dupont Corentin corentin.dup...@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
-Ursprüngliche Nachricht-
Von: Dupont Corentin corentin.dup...@gmail.com
Gesendet: 24.03.2010 11:01:32
An: haskell haskell-cafe@haskell.org
Betreff: [Haskell-cafe] accents
Hello,
i have a list of french words with accents.
How could i handle them?
If i load them with ghci i get