fix for ruby 1.9 and utf-8

@dashkb