Problem reading files...
Hello there. I was trying to read a bitmap file using hGetChar but I had a problem: if the file contains the byte 26-decimal (or 1A-hexa) the program aborts. Here you have the output: Fail: end of file Action: hGetChar Since hGetChar is implemented with getc, I created a similar program in C, using getc. This program written in C had no problems. Is this a haskell bug or does anyone know what'sgoing on? Thanks, Andre Furtado
Re: Problem reading files...
Andre W B Furtado wrote: [ EOF at Ctrl-Z problem ] Sounds like you're using WinDoze which interprets Ctrl-Z as EOF in non-binary files IIRC (great idea, BTW! :-}. Alas, you have to use non-standard features (openFileEx or hSetBinaryMode) to get around this, see: http://www.haskell.org/ghc/docs/latest/set/sec-ioexts.html#AEN8657 Cheers, Sven ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs