Supported version for ruby 1.8

Your string#encode will work only for ruby 1.9. So I just changed to ruby 1.8 encoding. So this new branch 'ruby 1.8' supports ruby version 1.8.