
23 Apr
2005
23 Apr
'05
4:22 p.m.
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