Fixed handling of UTF8 on JRuby.
Bugfix.