From: Michael Campbell Date: 2003-09-20T04:11:30+09:00 Subject: Re: Trouble with binary files? > -----Original Message----- > From: agemoagemo@yahoo.com [mailto:agemoagemo@yahoo.com] > Sent: Friday, September 19, 2003 2:01 PM > To: ruby-talk ML > Subject: Trouble with binary files? > > > 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? Are you using the "b" modifier on the open call? __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com