From: ruby talk Date: 2004-11-23T21:09:44+09:00 Subject: Re: binary reading I looked at the unpack example a=File.open("c:\\1.txt") a.each_byte { |byte| print byte.to_s.unpack('b8'),' ',byte,' ' } But i get this for output 01101100 65 01101100 66 i know A!=B and b* instead of b8 gives me 0110110010101100 65 0110110001101100 66 Becker On Tue, 23 Nov 2004 14:59:44 +0900, Eric Hodel wrote: > On 22 Nov 2004, at 20:22, ruby talk wrote: > > > hmm... i really wanted the binary. is there a to_b? > > I think you want to look at String#unpack. > >