Get Haskell programs to assume a UTF8 locale under wine
I don't have a Wine/Haskell setup here, so take this with many grains of salt. It looks GHC.IO.Encoding has what might be the right pieces for this:
setLocaleEncoding :: TextEncoding -> IO () utf8 :: TextEncoding
You could try making your test programs setLocaleEncoding utf8
before they get going. This isn't quite what you wanted, but if it works it seems easier than setting it separately for each handle.
I don't know if this works for Wine, but have you tried using the CHCP
command to set the current Windows code page?