From: "Mark J. Reed" Date: 2003-08-20T09:05:56+09:00 Subject: Re: Newbie Q: Getting character codes On Wed, Aug 20, 2003 at 12:42:20AM +0100, Tim Rowe wrote: > I need to get at the character code used to represent a character. I > realise that "f"[0] will return the code for "f" (102), but I read in > a FAQ that this behaviour may change, and I can't find any other way > of doing it. Would somebody point me to what I am missing, please? The ? operator is what you're looking for: irb(main):001:0> puts ?f 102 => nil irb(main):002:0> -Mark