Problem reading files...
Andre W B Furtado
aw@free.elogica.com.br
Mon, 12 Feb 2001 17:09:18 -0300
This is a multi-part message in MIME format.
------=_NextPart_000_0017_01C09516.88B29D00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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's going on?
Thanks,
Andre Furtado
------=_NextPart_000_0017_01C09516.88B29D00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2> Hello there. I was =
trying to=20
read a bitmap file using hGetChar but I had a problem: if the file =
contains the=20
byte 26-decimal (or 1A-hexa) the program aborts. Here you have the =
output:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Fail: end of file</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Action: hGetChar</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> Since hGetChar is =
implemented=20
with getc, I created a similar program in C, using getc. This program =
written in=20
C had no problems. Is this a haskell bug or does anyone know =
what's going=20
on?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Andre =
Furtado</FONT></DIV></BODY></HTML>
------=_NextPart_000_0017_01C09516.88B29D00--