Q:

How to convert character code to what I want?

Doing this:
s = "hello"
s[0]

outputs the character code value 104.
What do I need to do to convert the 104 such that it outputs 'h'?
I am using ruby 1.8.7.

A:

Some of your options include:

Use s[0].chr
Use s[0...1] or s[0,1]
Upgrade to Ruby 1.9 where strings are no longer considered arrays of bytes, and s[0] gives you "h" as expected.

