I am trying to use GHC on wine to build one of my Haskell applications for windows. So far, this works well, but I am stuck running my test suite, which is intended to be run in an UTF8-locale (LANG=C.utf8
for example.)
Unfortunately, under wine, the Haskell runtime always believes I want to use a non-unicode codepage:
$ wine ghc -e 'GHC.IO.Encoding.CodePage.localeEncoding'
CP850
$ LANG=C.utf8 wine ghc -e 'GHC.IO.Encoding.CodePage.localeEncoding'
CP437
$ LC_ALL=C.utf8 wine ghc -e 'GHC.IO.Encoding.CodePage.localeEncoding'
CP437
Besides changing the actual code to set the encoding of all handles: How would I make the Haskell program use UTF-8 (i.e. codepage 65001) here?