H98 Text IO

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Tue Feb 26 16:15:49 EST 2008


On Tue, 2008-02-26 at 07:28 -0800, John Meacham wrote:
> On Tue, Feb 26, 2008 at 01:34:54PM +0000, Duncan Coutts wrote:
> > Personally I'm not really fussed about which compromise we pick. I think
> > the more important point is that all the Haskell implementations pick
> > the same compromise so that we can effectively standardise the
> > behaviour.
> 
> Wait, are you talking about changing what ghc does or trying to change
> the haskell standard? I always thought ghc should do something more sane
> with character IO, non unicode aware programs are a blight.
> 
> I don't think choosing something arbitrary to standardize on is a good
> idea. It is not always clear what the best choice is. like, for instance
> until recently, jhc used locale encoding on linux, due to glibc's strong
> charset support and guarenteed use of unicode wchar_t's, but utf8 always
> on bsd-varients, where the wchar_t situation was less clear cut. On
> embedded systems, only supporting ASCII IO is certainly a valid choice.
> For a .NET backend, we will want to use .NET's native character IO
> routines.

Oh I wasn't trying to pin it down that much. If you want to use ebdic on
some embedded platform by default I don't care. I really mean that it'd
be nice if hugs, ghc, jhcm nhc98 etc could agree for each of the major
platforms, Linux/Unix, OS X and Windows. And I don't mean necessarily
that they should do the same thing across platforms (eg as I understand
it OS X would always use UTF8 not a variable locale) just that they
should do the same on the same platform.

So not a change of the H98 spec, just a common consensus on the major
platforms.

Duncan



More information about the Libraries mailing list