ASCII-8BIT regexp

e$B$3$s$P$s$Oe(B sheepman e$B$G$9!#e(B

e$B%(%s%3!<%G%#%s%0$,e(B ASCII-8BIT e$B$G$"[email protected],I=8=%%V%8%’%/%H$Ke(B
e$B4X$7$F<ALd$G$9!#[email protected],I=8=$N%(%s%3!<%G%#%s%0$,e(B
ASCII-8BITe$B$G$"$k$H$$$&$N$O$I$&$$$&$3$H$J$Ne(B?e$B!W$H$$$&$3$H$G$9!#e(B
e$B6qBNE
$K$Oe(B2e$B$D$"$j$^$9!#e(B

e$B$R$H$D$a!#e(Bfixed encoding
[email protected],I=8=$N%(%s%3!<%G%#%s%0$Oe(B
ASCII-8BIT e$B$G$9!#$3$l$O$3$&$$$&$b$N$G$7$g$&$+!#G$0U$N%(%s%3!<e(B
e$B%G%#%s%0$NJ8;zNs$K$A$c$s$H%^%C%[email protected],I=8=$,e(B ASCII-8BIT
e$B$H$$$&e(B
e$B$N$OJQ$J5$$,$7$^$9!#e(Bnil e$B$rJV$7$?J}$,NI$$$N$G$O$H;W$$$^$9!#e(B
e$B$"$s$^$j6/$$0U8+$r;}$C$F$$$k$o$1$G$O$J$$$G$9$,!#e(B

e$B$U$?$D$a!#[email protected]$H;W$$$^$9!#e(Bn
e$B%*%W%7%g%[email protected],I=8=$,e(B
e$B%^%k%A%P%$%H$NJ8;zNs$K%^%C%A$7$?;~e(B
e$B7Y9p$,=P$^$9!#$3$l$O$I$&$$$&0U?^$J$s$Ge(B
e$B$7$g$&$+!#e(B

$ ruby-1.9 -v -e ‘/./n =~ “e$B$$$m$Oe(B”’
ruby 1.9.0 (2008-01-22 revision 0) [i686-linux]
-e:1: warning: regexp match /…/n against to EUC-JP string

(1)
e$BK\Mh$ONc30$rEj$2$?$$$1$Ie([email protected]$N$?$a$K7Y9p$K$H$I$a$F$$$k!#e(B
(2)
e$B:#$NF0:n$,;[email protected]$1$I!"e([email protected]$,L5$$$+$i7Y9p$r=P$7$F$$$k!#e(B

(1)e$B$+e(B(2)e$B$+$G%^%K%e%"%k$N5-=R$,JQ$o$k$H;W$$$^$9!#$h$m$7$/$*4j$$$7$^$9!#e(B

In article [email protected],
sheepman removed_[email protected] writes:

e$B$R$H$D$a!#e(Bfixed encoding [email protected],I=8=$N%(%s%3!<%G%#%s%0$Oe(B
ASCII-8BIT e$B$G$9!#$3$l$O$3$&$$$&$b$N$G$7$g$&$+!#G$0U$N%(%s%3!<e(B
e$B%G%#%s%0$NJ8;zNs$K$A$c$s$H%^%C%[email protected],I=8=$,e(B ASCII-8BIT e$B$H$$$&e(B
e$B$N$OJQ$J5$$,$7$^$9!#e(Bnil e$B$rJV$7$?J}$,NI$$$N$G$O$H;W$$$^$9!#e(B
e$B$"$s$^$j6/$$0U8+$r;}$C$F$$$k$o$1$G$O$J$$$G$9$,!#e(B

ASCII-8BIT e$B$G$"$k$3$H$K$?$$$7$?0UL#$O$"$j$^$;$s$,!"$=$l$O$=e(B
e$B$l$H$7$Fe(B fixed_encoding? e$B$,56$rJV$7$F$bG$0U$N%(%s%3!<%G%#%se(B
e$B%0$NJ8;zNs$K%^%C%A$9$k$o$1$8$c$J$$$H;W$$$^$9!#e(BASCII e$B8_49$8$ce(B
e$B$J$$$b$N$K$OE,MQ$G$-$J$$$s$8$c$J$$$G$7$g$&$+!#e(BUTF-16BE e$B$JJ8e(B
e$B;zNs$H$+!#e(B

$ ruby-1.9 -v -e ‘/./n =~ “e$B$$$m$Oe(B”’
ruby 1.9.0 (2008-01-22 revision 0) [i686-linux]
-e:1: warning: regexp match /…/n against to EUC-JP string

(1) e$BK\Mh$ONc30$rEj$2$?$$$1$Ie([email protected]$N$?$a$K7Y9p$K$H$I$a$F$$$k!#e(B
(2) e$B:#$NF0:n$,;[email protected]$1$I!"e([email protected]$,L5$$$+$i7Y9p$r=P$7$F$$$k!#e(B

e$B$=$N$&$ANc30$KJQ$o$k$+$I$&$+$H$$$&8+9~$_$O!"$H$$$&$H!"$I$&$Je(B
e$B$s$G$9$+$M$’!#e(B

e$BC/$+$,>-Mh$=$&$7$?$$$HDs0F$7$F!"$=$s$J$K1F6A$,$J$5$=$&[email protected]$H$$e(B
e$B$&[email protected]$K$J$l$P<[email protected]$b$"$k$s$8$c$J$$$G$7$g$&$+!#e(B

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

Tanaka A. wrote:

e$B$l$H$7$Fe(B fixed_encoding? e$B$,56$rJV$7$F$bG$0U$N%(%s%3!<%G%#%se(B
e$B%0$NJ8;zNs$K%^%C%A$9$k$o$1$8$c$J$$$H;W$$$^$9!#e(BASCII e$B8_49$8$ce(B
e$B$J$$$b$N$K$OE,MQ$G$-$J$$$s$8$c$J$$$G$7$g$&$+!#e(BUTF-16BE e$B$JJ8e(B
e$B;zNs$H$+!#e(B

US-ASCII e$B$+e(B ASCII-8BIT e$B$+$"[email protected]$K$J$j$=$&$G$9$,!"e(B
US-ASCII [email protected]$He(B EUC-JP e$B$Ke(B /./
e$B$,%^%C%A$9$k$N$O$*$+$7$/46$8$^$9$+$i!"e(B
e$B$=$3$+$i9M$($l$Pe(B ASCII-8BIT e$B$+$J$!$H!#e(B

e$BC/$+$,>-Mh$=$&$7$?$$$HDs0F$7$F!"$=$s$J$K1F6A$,$J$5$=$&[email protected]$H$$e(B
e$B$&[email protected]$K$J$l$P<[email protected]$b$"$k$s$8$c$J$$$G$7$g$&$+!#e(B

e$B$&!<$s!"$3$l$I$&[email protected]$m$&!#e(B

  • e$B7Y9p$b$J$/$7$F!"e(B/\xA4\x22/n =~ “e$B$$$m$Oe(B”
    e$B$b%^%C%A$9$k$h$&$K$7$A$c$*$&$<e(B
  • e$B7Y9p$J$/$9$1$Ie(B ascii only e$B$N$_e(B
  • e$B8=>u0];}e(B
  • e$B7Y9p$J$/$7$Fe(B \x44 e$B$K%^%C%Ae(B
  • e$BNc30e(B
    e$B$H$"$j$=$&$G$9$,!"$&!<$s!#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