Re: EOF

new topic     » goto parent     » topic index » view thread      » older message » newer message

Nathan wrote:

> I'm having a little problem reading certain kinds of files using getc();
> I can read pure text files, and bitmap files that aren't 24-bit, but I
> can only read a very small first part of exe's, jpegs, gifs, 24-bit
> bmps.. nearly everything else.  Does this have anything to do with the
> way the EOF is determined?

You're probably using "r" as the second parameter to open(). "r" is the
read-mode intended for text files and related things. This means that as
soon as your file hits a value of 26 (Control-Z) Euphoria thinks it's an
EOF.

> Any suggestions on how to overcome it (getting length of file and keeping
> track??) ?

Use "rb" [read binary] as the second parameter to open(). :)

Look here:
  http://www.rapideuphoria.com/lib_h_o.htm#open

Carl

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu