[Haskell-cafe] invalid character encoding

Ross Paterson ross at soi.city.ac.uk
Thu Mar 17 07:16:54 EST 2005

On Thu, Mar 17, 2005 at 06:22:25AM +0000, Ian Lynagh wrote:
> On Tue, Mar 15, 2005 at 10:44:28AM +0000, Ross Paterson wrote:
> > You can select binary I/O using the openBinaryFile and hSetBinaryMode
> > functions from System.IO.  After that, the Chars you get from that Handle
> > are actually bytes.
> What about the ones sent to it?
> Are all the following results intentional?
> Am I doing something stupid?

No, I was.  Output primitives other than hPutChar were ignoring binary
mode (and Hugs has more of these things as primitives than GHC does).
Now fixed in CVS (rev. 1.95 of src/char.c).

More information about the Haskell-Cafe mailing list