Outputing UTF-8 string on Mac OS's Terminal
Posted
by SuperBloup
on Stack Overflow
See other posts from Stack Overflow
or by SuperBloup
Published on 2010-05-29T16:40:38Z
Indexed on
2010/05/29
18:22 UTC
Read the original article
Hit count: 230
I got a programm in haskell outputting utf-8 using the package utf8-string
and using only the output functions of this package.
I set the encoding of each file I write to this way :
hSetEncoding myFile utf8
{- myFile may be stdout -}
but when I try to output :
alpha = [fromEnum 0x03B1] {- a -}
instead of the nice alpha letter I got on Linux (or in a file on windows), I got the following :
α
The weird thing is even if I try to write the output on a file, I can't read it back with mvim as an utf-8 file. Is there any way to get the correct behaviour
© Stack Overflow or respective owner