H98 Text IO
duncan.coutts at worc.ox.ac.uk
Tue Feb 26 08:46:44 EST 2008
On Wed, 2008-02-27 at 00:31 +1100, Roman Leshchinskiy wrote:
> Duncan Coutts wrote:
> > So here is a concrete proposal:
> > * Haskell98 file IO should always use UTF-8.
> > * Haskell98 IO to terminals should use the current locale
> > encoding.
> Personally, I'd find this deeply surprising. I don't care that much what
> locale gets used for I/O (if it matters, you have to deal with it
> explicitly anyway) as long as it is consistent. I'm probably mistaken,
> but doesn't this proposal mean that I can't implement cat in H98 using
> text I/O? That would be a bit disturbing.
You've never been able to do that with the guarantees provided by H98.
The current base lib provides System.IO.openBinaryFile which does make
it possible to implement cat on binary files.
> Also, would this affect the encoding used for file names? If so, how?
No, that's a separate issue.
More information about the Glasgow-haskell-users