Gimitee$B$H$$$$$^$9!#e(B
Ruby 1.9.1e$B$Ge(B
$stdin.set_encoding(“UTF-8”, “UTF-8”)
$stdin.gets()
e$B$H$9$k$He(B
test.rb:4:in gets': code converter not found (UTF-8 to UTF-8) (Encoding::ConverterNotFoundError) e$B$H8@$o$l$k$N$O!"$$$1$F$J$$5$$,$9$k$N$G$9$,!"$3$&$$$&$b$N$G$7$g$&$+!#$3$NNc$@$He(B$stdin.set_encoding("UTF-8")e$B$H$9$l$P:Q$
$N$G$9$,!"$?$H$($P!VI8=`F~NO$G%m%1!<%k$NJ8;z%3!<%I$+$ie(BUTF-8e$B$KJQ49$7$?$$!W$H$$$&$H$-$Ke(B
$stdin.set_encoding(Encoding.find(“locale”),
Encoding.find(“locale”) == Encoding::UTF_8 ? nil : Encoding::UTF_8)
e$B$H=q$+$J$1$l$P$$$1$J$$$N$O$d$dLLE]$J5$$,$7$^$9!#e(Binternal_encoding
external_encodinge$B$J$iAGDL$7$9$k!"$H$$$&$N$O$I$&$G$7$g$&$+!)e(B
e$B$A$J$_$K!"=PNO$N>l9g$O%(%i!<$K$J$i$J$$$h$&$G$9!#e(B
$stdout.set_encoding(“UTF-8”, “UTF-8”)
$stdout.puts(“e$B$[$2e(B”)
e$B;n$7$?4D6-$Oe(B
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-freebsd6.0]
e$B$G$9!#e(B