From: Heinz Werntges Date: 2003-09-20T04:08:40+09:00 Subject: Re: Trouble with binary files? agemoagemo@yahoo.com wrote: >I'm trying to write a program that will read a binary >file into an buffer, do stuff with it, and then write >the result back into another file. However, I'm >running into a problem. > >I haven't been able to find a way that will read in >more than the first 160 bytes (of a 910 byte file). >I've tried using each_byte and looping with getc, as >well as storing the results in a string or an array. > >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? > >-Morgan. > >__________________________________ >Do you Yahoo!? >Yahoo! SiteBuilder - Free, easy-to-use web site design software >http://sitebuilder.yahoo.com > > > > Did you try IO#binmode ? Unix guys (like me) typically miss that when working in a Windows environment. Cheers, -- Heinz