fix for encoding issues for ruby 1.9