[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Trouble with binary files?

Thomas Morgan

9/19/2003 7:27:00 PM


--- Joey Gibson <joey@joeygibson.com> wrote:
> On 9/19/2003 3:00 PM, agemoagemo@yahoo.com wrote:
>
> >I've never had this sort of problem working with
> text
> >files. Is there something else I have to do to be
> able
> >to work with binary data?
> >
> Are you on a Windows box and are you opening the
> file in binary mode? I had this same problem
> recently with the same results. The problem was a
> Ctrl-Z some way into the file that was being
> interpreted as EOF. The fix was to add a 'b' to the
> open flags:

*checks the file* Next byte was hex 1A, which... is
Ctrl-Z. Well, that answers the other questions...

-Morgan.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder...