JRuby IO string encoding fix.