Subject: [ruby-talk:12322] Re: Reading a binary file / writing binary data to a file
From: ts <decoux moulon.inra.fr>
Date: Fri, 9 Mar 2001 20:43:57 +0900
References:
In-reply-to: message from Paul Pladijs on Fri, 9 Mar 2001 20:38:00 +0900
>>>>> "P" == Paul Pladijs <ppladijs / cage.rug.ac.be> writes:
Try in binary mode
P> File.open ("binaryfile.dat", "r") { |f|
File.open ("binaryfile.dat", "rb") { |f|
P> while ch = f.getc
P> puts "read a character: #{ch}"
P> end
P> }
Guy Decoux