MISC - Fix encode bug in ruby 1.9