I got a program in haskell that outputs utf-8 using a package utf8-stringand using only the output functions of this package.
I set the encoding of each file that I write as follows:
hSetEncoding myFile utf8
{- myFile may be stdout -}
but when I try to output:
alpha = [toEnum 0x03B1] {- α -}
instead of the pretty letter I got on Linux (or in the file on windows), I got the following:
α
Strange, even if I try to write the output to a file, I cannot read it with mvim as utf-8. Is there a way to get the right behavior
source
share