Rb_enc_mbclen

rb_enc_mbclen e$B$N%$%s%?!<%U%’!<%9$Oe(B GB18030 e$B$J$I$G:$$k$s$8$ce(B
e$B$J$$$G$7$g$&$+!#e(B

rb_enc_mbclen e$B$K$O%a%b%jFb$N3+;O0LCV$OM?$($i$l$^$9$,!"=*C<0Le(B
e$BCV$OM?$($i$l$^$;$s!#$=$N$?$a!“FI$s$G$O$$$1$J$$$H$3$m$rFI$`2De(B
[email protected]$,$”$k$h$&$K;W$$$^$9!#e(B

e$B9,$$$K$7$F8=:_$Ne(B Ruby e$B$Oe(B ascii, sjis, euc-jp, utf8
e$B$7$+07$oe(B
e$B$:!"[email protected],$N%P%$%[email protected]$1D4$Y$l$PJ8;z$ND9$5$,$o$+$j$^$9!#e(B
e$B$7$+$7!“J8;z%3!<%I$,0lHL$K$=$&$G$”$k$H$O8B$i$:!"Nc$($Pe(B
GB18030 e$B$NJ8;z$,e(B 2e$B%P%$%H$+e(B 4e$B%P%$%H$+$Oe(B
2e$B%P%$%H$a$rD4$Y$J$$$He(B
e$B$o$+$j$^$;$s!#e(B

e$B$J$s$G$3$s$J%$%s%?!<%U%’!<%9$r;H$&$s$G$9$+e(B?

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:31651] rb_enc_mbclen”
on Sat, 25 Aug 2007 20:06:03 +0900, Tanaka A. [email protected]
writes:

|rb_enc_mbclen e$B$N%$%s%?!<%U%’!<%9$Oe(B GB18030 e$B$J$I$G:$$k$s$8$ce(B
|e$B$J$$$G$7$g$&$+!#e(B

|e$B$J$s$G$3$s$J%$%s%?!<%U%’!<%9$r;H$&$s$G$9$+e(B?

e$B$=$&$G$9$h$M$(!#$3$l$O54<V$+$i7Q>5$7$F$k$s$G$9$1$I!#e(B

e$B0l1~!“8=:_;H$o$l$F$$$k>l=j$K$D$$$F$O!“FI$s$G$O$$$1$J$$$H$3$me(B
e$B$OFI$^$J$$$h$&$K$7$F$k$3$H$r3NG’$7$F$O$$$^$9!#$”$s$^$j54<V<+e(B
e$B?H$K<j$rF~$l$?$/$OL5$+$C$?$s$G$9$1$I!”$3$3$O$$$8$i$J$$$H$7$ge(B
e$B$&$,$J$$$+$J$"!#e(B

In article [email protected],
Yukihiro M. [email protected] writes:

e$B0l1~!"8=:_;H$o$l$F$$$k>l=j$K$D$$$F$O!"FI$s$G$O$$$1$J$$$H$3$me(B
e$B$OFI$^$J$$$h$&$K$7$F$k$3$H$r3NG’$7$F$O$$$^$9!#e(B

e$B$=$N3NG’$H$$$&$N$O%(%s%3!<%G%#%s%0$,e(B ascii, euc-jp, sjis,
utf8 e$B$7$+$J$/$F!"@hF,$Ne(B 1byte e$B$GJ8;z$ND9$5$,$o$+$kA0Ds$NOC$Ge(B
e$B$9$h$M!#e(B

e$B$=$NA0Ds$,$J$1$l$PL5M}$G$7$g$&!#$?$H$($P!“e(BIO e$B$N%P%C%U%!$Ke(B
1byte [email protected]$1F~$C$F$$$F!”$=$3$Ge(B GB18030 e$B$H$7$FJ8;z$ND9$5$rD4$Ye(B
e$B$h$&$H;W$($P!"%G!<%?$8$c$J$$$H$3$m$rFI$s$G$7$^$&[email protected]$,$"$je(B
e$B$^$9!#e(B

e$B$"$s$^$j54<V<+e(B
e$B?H$K<j$rF~$l$?$/$OL5$+$C$?$s$G$9$1$I!"$3$3$O$$$8$i$J$$$H$7$ge(B
e$B$&$,$J$$$+$J$"!#e(B

e$B54<V<+?H$O:$$i$J$$$s$G$9$+$M$’!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:31654] Re: rb_enc_mbclen”
on Sun, 26 Aug 2007 00:44:31 +0900, Tanaka A. [email protected]
writes:

|> e$B0l1~!“8=:_;H$o$l$F$$$k>l=j$K$D$$$F$O!“FI$s$G$O$$$1$J$$$H$3$me(B
|> e$B$OFI$^$J$$$h$&$K$7$F$k$3$H$r3NG’$7$F$O$$$^$9!#e(B
|
|e$B$=$N3NG’$H$$$&$N$O%(%s%3!<%G%#%s%0$,e(B ascii, euc-jp, sjis,
|utf8 e$B$7$+$J$/$F!”@hF,$Ne(B 1byte e$B$GJ8;z$ND9$5$,$o$+$kA0Ds$NOC$Ge(B
|e$B$9$h$M!#e(B
|
|e$B$=$NA0Ds$,$J$1$l$PL5M}$G$7$g$&!#$?$H$($P!“e(BIO e$B$N%P%C%U%!$Ke(B
|1byte [email protected]$1F~$C$F$$$F!”$=$3$Ge(B GB18030 e$B$H$7$FJ8;z$ND9$5$rD4$Ye(B
|e$B$h$&$H;W$($P!”%G!<%?$8$c$J$$$H$3$m$rFI$s$G$7$^$&[email protected]$,$"$je(B
|e$B$^$9!#e(B

e$B0l1~!"$9$Y$F$N>l=j$GEO$9J8;zNs$Oe(BNUL terminated
stringe$B$G$"$C$F!“e(B
2bytee$BL$O:G0-$G$be(BNULe$B$G$”$k$3$H$r8+$F$^$9!#$N$G!“e(BGBe$BDxEY$G$”$le(B
e$B$P$J$s$H$+!#2>$Ke(B3e$B%P%$%HL$r8+$J$$$HD9$5$,$o$+$i$J$$%(%s%3!<%G%#e(B
e$B%s%0$,$"$l$PGKC>$9$k$G$7$g$&$M!#e(B

|e$B54<V<+?H$O:$$i$J$$$s$G$9$+$M$’!#e(B

GB18030e$BBP1~$G$O%A%’%C%/$7$J$$$Ge(B2e$B%P%$%HL$rFI$s$G$^$9!#e(B

In article [email protected],
Tanaka A. [email protected] writes:

UTF16LE e$B$b$=$&$_$?$$$G$9$M!#e(B

e$B%"%$%L8l$H$+$N07$$$N$?$a$K!“e(BUnicode e$B$Ne(B grapheme
e$B$r$R$H$D$NJ8e(B
e$B;z$H$7$F07$&$h$&$J%(%s%3!<%G%#%s%0$r9M$($k$H!“e(Brb_enc_mbclen
e$B$K$O!”%a%b%j$N=*N;[email protected]$1$8$c$J$/$F!”$=$N=*N;0J9_$K%G!<%?$,e(B
e$B$"$j$&$k$N$+$I$&$+$r65$($F$d$i$J$$$H$$$1$J$J$5$=$&$G$9!#e(B

grapheme e$B$O$R$H$D$Ne(B base character e$B$N8e$Ke(B 0e$B8D0J>e$Ne(B
combining character e$B$,[email protected]$b$N$G$9!#e(BI/O e$B$N%P%C%U%!$H$+$Ge(B
base character e$B$^$G$7$+F~$C$F$$$J$+$C$?;~$K$O!"e(B

  • e$BB3$-$,$J$$$3$H$,$o$+$C$F$$$ke(B (EOF e$B$,8!=P$5$l$F$$$ke(B)
    e$B>l9g$Oe(B
    e$B$=$Ne(B base character [email protected]$1$r0lJ8;z$H$7$FH=CG$7!"e(B
  • e$BB3$-$,$"$k$+$b$7$l$J$$>l9g$O!"B3$-$,$J$$$H$o$+$i$J$$$H$$$&e(B
    e$B7k2L$rJV$9!“e(B
    e$BI,MW$,$”$j$^$9!#e(B

e$B$^$!!“8eB3$N%G!<%?$,$”$j$&$k$+$I$&$+$r65$($F$d$kBe$o$j$K!"N>e(B
e$BJ}$N>l9g$N7k2L$r$R$H$D$N7k2L$K$^$H$a$FJV$9$3$H$b9M$($i$l$k$+e(B
e$B$J!#e(B

http://unicode.org/faq/char_combmark.html

e$B$&$%$`!#$;$a$Fe(B combining character e$B$N$[$&$,@h$K$"$l$P$$$$$Ne(B
e$B$K!#e(B

In article [email protected],
Yukihiro M. [email protected] writes:

e$B0l1~!"$9$Y$F$N>l=j$GEO$9J8;zNs$Oe(BNUL terminated stringe$B$G$"$C$F!“e(B
2bytee$BL$O:G0-$G$be(BNULe$B$G$”$k$3$H$r8+$F$^$9!#$N$G!“e(BGBe$BDxEY$G$”$le(B
e$B$P$J$s$H$+!#2>$Ke(B3e$B%P%$%HL$r8+$J$$$HD9$5$,$o$+$i$J$$%(%s%3!<%G%#e(B
e$B%s%0$,$"$l$PGKC>$9$k$G$7$g$&$M!#e(B

rb_io_getc e$B$Ke(B

n = rb_enc_mbclen(fptr->rbuf+fptr->rbuf_off, enc);

e$B$H$$$&9T$,$"$j$^$9!#e(Brbuf e$B$O;d$,<BAu$7$?;~$K$Oe(B NUL terminated
e$B$G$O$"$j$^$;$s$G$7$?$7!"%3!<%I$r8+$k8B$j$O$$$^$G$b$=$&$G$O$Je(B
e$B$$$h$&$K;W$$$^$9!#e(Brbuf_off e$B$,e(B rbuf
e$B$N:G8e$N%P%$%H$r;X$92DG=e(B
[email protected]$O$"$k$N$G$O$J$$$G$9$+!#e(B

GB18030e$BBP1~$G$O%A%’%C%/$7$J$$$Ge(B2e$B%P%$%HL$rFI$s$G$^$9!#e(B

UTF16LE e$B$b$=$&$_$?$$$G$9$M!#e(B

e$B$=$3$i$X$s$rMxMQ$7$Fe(B SEGV e$B$5$;$F!"e(Bbug fix
e$B$H$7$F2~A1$r<h$j9~e(B
e$B$s$G$b$i$&$N$,$_$s$J$G9,$;$K$J$kF;$J$N$G$O$J$$$+$H;W$$$^$9!#e(B

e$B$$=$i$/!“e(Bmmap e$B$”$?$j$GD>8e$,%"%/%;%9ITG=$J%a%b$jNN0h$r:n$Ce(B
e$B$F!"$=$N:G8e$Ne(B byte e$B$Ke(B 0x81 e$B$r$
$$$F!"$=$Ne(B 1byte
e$B$rBP>]$Ke(B
GB18030 [email protected],I=8=$G%^%C%A$r$+$1$l$P!"e(BSEGV e$B$9$k$H;W$&$se(B
e$B$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