Output character encoding for ghc on OpenBSD

Matthias Kilian kili at outback.escape.de
Mon Apr 19 10:06:24 EDT 2010

On Mon, Apr 19, 2010 at 02:57:00PM +0100, Simon Marlow wrote:
> A few of the tests in the test suite assume a UTF-8 locale, so you're 
> probably falling foul of that.  We could fix the tests - but we do want 
> to test that the locale encoding is being respected in some way, so just 
> adding hSetEncoding to those tests would be wrong.

Nah, don't touch the tests because of this.

> For the IO library, I expect you should default the encoding to Latin-1 
> on OpenBSD.

I've some (rather horrible) patch that tries to make sense out of
LC_ALL or LC_CTYPE if set. And  if it isn't set, I'm currently
defaulting to 646//TRANSLIT (which is ASCII with translation of
some non-ASCII characters to ASCII art, like `(c)' for \xa9). But
Latin-1 may be a more usable default. Thanks for the suggestion.

(No, I'm not going to send this patch to cvs-ghc, it's really too


More information about the Glasgow-haskell-users mailing list