Ruby 1.9 trunk NKF and KCONV Encoding:ASCII-8BIT

e$BEOJUE/Li$G$9!#e(B

nkf e$B$de(B kconv e$B$GJ8;zNs$N4A;z%3!<%I$rJQ49$9$k$He(B

Encoding:ASCII-8BIT

e$B$K$J$C$F$$$^$9!#6/@)E*$Ke(B

String#force_encoding

e$B$9$l$P$$$$$N$G$9$,!“4A;z%3!<%I$NJQ49$N$H$-$Ke(B encoding
e$B$r$”$o$;$k$o$1$K$O$$$+$J$$$G$7$g$&$+e(B?

e$B$=$N$[$+!"$3$&$9$l$P$$$$$J$I$N>pJs$,$"$l$P65$($F$/[email protected]$5e(B
e$B$$!#e(B

ruby 1.9.0 (2007-12-04 patchlevel 0) [i686-linux]

e$B<B9T4D6-$Oe(B Linux e$B$G$9!#e(B


require ‘nkf’

k = ‘e$B$"e(B’
puts k.encoding

puts k.sub(/^e$B"#e(B\s*/, ‘’)

k = ‘e$B$"e(B’
k = NKF.nkf(’-e’, k)
puts k.encoding
k.force_encoding(‘euc-jp’)

puts k.sub(/^e$B"#e(B\s*/, ‘’)

require ‘kconv’

k = ‘e$B$"e(B’
k = k.toeuc
puts k.encoding
k.force_encoding(‘euc-jp’)

puts k.sub(/^e$B"#e(B\s*/, ‘’)

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

WATANABE Tetsuya wrote:

e$B$=$N$[$+!"$3$&$9$l$P$$$$$J$I$N>pJs$,$"$l$P65$($F$/[email protected]$5e(B
e$B$$!#e(B

e$BC1=c$KL$<BAu$G$9!#e(B
String#encode
e$B$N<BAu$r8+$D$DJ}?K$r7hDj$7$h$&$H;W$C$F$$$?$N$G$9$,!“5$$E$1e(B
e$B$P;UAv!#$H$j$”$($:e(B kconv e$B$Ne(B String#to*
e$B$O$=$l$C$]$/$7$F$*$-$^$9!#e(Bnkf e$B$Ke(B
e$B4X$7$F$Oe(B CP932
e$B$N$h$&$J%(%s%3!<%G%#%s%0$N07$$$r$I$&$9$k$+$,G:$_$I$3$m$Je(B
e$B$N$G$9$h$M!#e(B

e$B$=$b$=$b!“e(BString#encode e$B$,<BAu$5$l$?$ie(B String#to*
e$B$O>C$7$F$7$^$C$?J}$,$$e(B
e$B$$e(B e$B”*e(B kconv
e$B:o=|$C$F$$$&$N$b<gD%$H$7$F$"[email protected]$H;W$C$F$$$?$j!#e(B

[email protected]@%$5$s$Xe(B

e$BEOJUE/Li$G$9!#e(B

e$B>pJs$"$j$,$H$&$4$6$$$^$9!#e(B

In message “[ruby-dev:32450] Re: ruby 1.9 trunk NKF and KCONV
Encoding:ASCII-8BIT”
on 07/12/04, “NARUSE, Yui” e$B$5$se(B writes:

|e$B$=$b$=$b!“e(BString#encode e$B$,<BAu$5$l$?$ie(B String#to* e$B$O>C$7$F$7$^$C$?J}$,$$e(B
|e$B$$e(B e$B”*e(B kconv e$B:o=|$C$F$$$&$N$b<gD%$H$7$F$"[email protected]$H;W$C$F$$$?$j!#e(B

e$B$$$$J}8~$K$$$C$F$/$l$k$H$$$$$N$G$9$,!#e(B

e$BEOJUE/Li$G$9!#e(B

r14399 e$B$GF0:n3NG’$7$^$7$?!#e(B

e$B$"$j$,$H$&$4$6$$$^$9!#e(B

In message “[ruby-dev:32654] Re: ruby 1.9 trunk NKF and KCONV
Encoding:ASCII-8BIT”
on 07/12/20, “NARUSE, Yui” e$B$5$se(B writes:

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

|nkf/kconv e$B$Ne(B e$BBP1~$r$H$j$"$($:9T$$$^$7$?!#e(B

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

r14484 [email protected]$7$$%(%s%3!<%G%#%s%0$N%l%W%j%+$rJV$9$h$&$K$7$^$7$?!#e(B

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

WATANABE Tetsuya wrote:

e$BEOJUE/Li$G$9!#e(B

nkf e$B$de(B kconv e$B$GJ8;zNs$N4A;z%3!<%I$rJQ49$9$k$He(B

Encoding:ASCII-8BIT

e$B$K$J$C$F$$$^$9!#e(B

nkf/kconv e$B$Ne(B e$BBP1~$r$H$j$"$($:9T$$$^$7$?!#e(B
Encoding::CP932 e$BEy$,e(B ASCII-8BIT
e$B$N%l%W%j%+$K$J$C$F$$$k$N$O4{CN$N%P%0$G!"e(B
e$B$$$$$$D>$9M=Dj$G$9!#$A$c$s$H$7$?<BAu$Oe(B 1.9.1
e$B$K$O4V$K9g$o$J$$$+$b$7$le(B
e$B$^$;$s!#$d$C$D$1<BAj$r2>$K$7$F$*$$$?J}$,$$$$$+$J$!!#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