Binary IO

David Menendez zednenem at
Sat Apr 23 16:22:41 EDT 2005

Glynn Clements writes:

> Simon Marlow wrote:
> > I presume that hPutWord8 (fromIntegral (ord '\n')) should not flush
> > a line-buffered Handle, which is another slight complication.
> No, it should flush it.
> > Perhaps line-buffering should be the same as block-buffering on
> > binary Handles.
> Buffering mode and EOL conversions should be orthogonal.
> With regard to the last three points, byte I/O isn't just for binary
> files. It's equally useful for "8-bit text" I/O, i.e. the historical
> Unix (and ANSI C stdio) model, where and you just shuffle bytes
> around without paying attention to the encoding.

So, how does this work on an EBCDIC system where 0x0a is Start Manual
Message and line feed is 0x25?
David Menendez <zednenem at> <>

More information about the Libraries mailing list