fix ruby 1.9 utf8 string truncating