Nkf MINE encoding bug

e$B$-$7$b$H$G$9e(B

ruby 1.9
e$B$G$OD>$C$F$k$h$&$J$N$G!"$9$G$K2r7h:Q$_$J$N$+$b$7$l$^$;$s$,!"e(B
nkf e$B$N%P%0$r3NG’$7$?$N$GJs9p$7$^$9!#e(B

e$B0J2<$N$h$&$K!"e(Bruby 1.8 e$B$G$O!"M>7W$Je(B "\n " e$B$,IU$-$^$9!#e(B

$ cat hoge.rb

coding: utf-8

require ‘nkf’

s = " e$B$"$"$"$"$"$“e(B\n”
s = NKF.nkf ‘-MWj’, s
p s

$ ruby18 --version
ruby 1.8.7 (2009-04-08 patchlevel 160) [amd64-freebsd8]
$ ruby18 -Ku hoge.rb
"
=?ISO-2022-JP?B?GyRCJCIkIiQiJCIkIiQiGyhC?=\n\n "

$ ruby19 --version
ruby 1.9.2dev (2009-11-20 trunk 25868) [x86_64-freebsd8.0]
$ ruby19 hoge.rb
"
=?ISO-2022-JP?B?GyRCJCIkIiQiJCIkIiQiGyhC?=\n"

[email protected]@%$G$9!#e(B

(2010/02/03 8:03), KISHIMOTO, Makoto wrote:

e$B$-$7$b$H$G$9e(B

ruby 1.9 e$B$G$OD>$C$F$k$h$&$J$N$G!"$9$G$K2r7h:Q$_$J$N$+$b$7$l$^$;$s$,!"e(B
nkf e$B$N%P%0$r3NG’$7$?$N$GJs9p$7$^$9!#e(B

e$B$=$&$G$9$M!#e(B
Ruby 1.8.8 [email protected]:Q$_$Ne(B nkf e$B$rE:IU$9$kM=Dj$G$9$,!"e(B
1.8.[67] e$B$G$O$=$N$^$^$N$D$b$j$G$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs