Fix invalid byte sequence in UTF-8 with Ruby 1.9.3

Starting with Ruby 1.9, the encoding of string has to be explicitly specified.