From: Eric Hodel Date: 2005-09-01T13:56:04+09:00 Subject: Re: how to read binary file with char 0x1A On 31 Aug 2005, at 21:24, hsun wrote: > Hi, > > I tried to read a binary file with a char '0x1A' (EOF on window I > guess). The method > > File::each_byte stops at this char. > How can get it to read the whole file? Is there a binary mode for > file operation? File.open name, 'rb' do |fp| # ... end PS: File::each_byte references a class method. You meant File#each_byte. -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04