Re: [Haskell-beginners] hGetContents, unicode and
Erik de Castro Lopo wrote:
> hGetContents: invalid argument (Invalid or incomplete multibyte or wide
> I've done some googling which seems to suggest that I need to set
> the LANG environment variable, but I already have that set to
You can check to see what encoding GHC has picked up from your
environment by examining localeEncoding.
You can force the encoding to UTF-8 by
hSetEncoding stdin utf8
hSetEncoding stdout utf8
All of the above in the context of import System.IO, of course.
Beginners mailing list