From: John Joyce Date: 2007-08-17T06:28:34+09:00 Subject: Re: character to hex/binary/etc... On Aug 16, 2007, at 3:27 PM, Tom Werner wrote: > John Joyce wrote: >> Hmm... I can turn a number into a character with .chr >> I can convert my numbers with .to_s(2) ((where 2 is a radix, or >> base)) >> But how do I convert numbers to characters?? >> >> > > You may be looking for Array#pack. It's useful for converting an > array from one encoding to another. One of these possibilities is > to convert an array of numbers into a string: > > n = [65, 66, 67] > n.pack("c*") > #=> "ABC" > > > Pack (and unpack) can do tons of useful and surprising things. > > Tom > The creator of god! I must listen carefully. I after some reading, I'm starting to think about using the files signatures used by DROID / PRONOM Anyone know much about that stuff? Any Ruby implementations/bindings?