From: Siep Korteling Date: 2008-05-13T23:11:23+09:00 Subject: Re: How to convert character to hexadecimal? I単aki Baz Castillo wrote: > Hi, I want to convert some characteres to hexadecimal: > > " " (space) => x20 > "\t" (tab) => x09 > > and so. I'm trying using to_i(16) but don't get it working at all. Any > help please? " "[0].to_s(16) " ".sum.to_s(base=16) I figured the last one out myself, don't know if it's reliable. Regards, Siep -- Posted via http://www.ruby-forum.com/.