$B$J$<(B transcode.c $B$N(B transcode_loop $B$G(B from_utf8 $B$,FCJL07$$(B

e$BCfED$5$s!“3’$5$s!”$3$s$K$A$O!#e(B

e$B$3$N4V$N%_!<%F%#%s%0$GCfED$5$s$Ke(B
e$B!V$J$<e(B transcode.c e$B$Ne(B transcode_loop e$B$Ge(B from_utf8
e$B$,FCJL07$$$5$l$F$$$k$N$+!We(B
e$B$HJ9$+$l$^$7$?!#e(B

e$B$=$N;~$O$9$0$KJV;v$,=P$^$;$s$G$7$?$,!"$J$s$H$J$/<+J,$Ne(B
[email protected]_7W$G$$$$$H$O;W$$$^$7$?!#:G6aB?J,0lHVJ,G<[email protected]$9$k$h$&$J$b$N$re(B
e$B8+$D$1$^$7$?!#e(B

cd enc/trans
grep ‘offsets[256]’ *.c|wc
78 234 3386
grep ‘offsets[64]’ *.c|wc
985 2955 42584

e$B?t;z$,$A$g$C$H0c$&$+$b$7$l$^$;$s$,!“7k6Ie(B UTF-8 e$B$GFCJL07$$e(B
e$B$5$l$F$$$k%F!<%V%k$O$=$&$G$J$$%F!<%V%k$h$je(B10e$BG$[$IB?$$!#e(B
e$B$J$<$J$ie(B UTF-8 e$B$X$NJ8;z%3!<%IJQ49$N>l9g!”%F!<%V%k$O$$$`$Me(B
e$B%3%s%Q%/%H$G$"$k$J$N$K!"e(BUTF-8 e$B$+$i$N>l9g$O7k9=%P%i%P%i$K$J$ke(B
e$B$3$H$,B?$$$G$9!#$7$+$be(B UTF-8 e$B$+$ie(B (e$BFs%P%$%HL\0J9_e(B)
e$B$rFCJL07$$e(B
e$B$9$k$H%F!<%V%k$NBg$-$5$,e(B 1/4 e$B$K$J$k$N$K!"B>$N%F!<%V%k$G$Oe(B
1/3 e$B$H$+e(B 1/2 e$B$H$+$7$+4|BT$G$-$J$$$G$9!#$h$C$Fe(B UTF-8
e$B$NFs%P%$%HL\e(B
[email protected]$1$rFCJL07$$$9$k$HAjEv%G!<%?$NNL$,8:$k$,!"JL$N%1!<%9$re(B
e$BFCJL07$$$7$F$b$=$l0J>e$=$s$J$K8:[email protected]$&$3$H$G$9!#e(B

e$B59$7$/$*4j$$$7$^$9!#e(B Martin.

#-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-# http://www.sw.it.aoyama.ac.jp mailto:[email protected]

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

At Mon, 3 Mar 2008 17:19:19 +0900,
Martin D. wrote in [ruby-dev:33972]:

cd enc/trans
grep ‘offsets[256]’ *.c|wc
78 234 3386
grep ‘offsets[64]’ *.c|wc
985 2955 42584

25678 + 64985 = 83008byte

e$B?t;z$,$A$g$C$H0c$&$+$b$7$l$^$;$s$,!“7k6Ie(B UTF-8 e$B$GFCJL07$$e(B
e$B$5$l$F$$$k%F!<%V%k$O$=$&$G$J$$%F!<%V%k$h$je(B10e$BG$[$IB?$$!#e(B
e$B$J$<$J$ie(B UTF-8 e$B$X$NJ8;z%3!<%IJQ49$N>l9g!”%F!<%V%k$O$$$`$Me(B
e$B%3%s%Q%/%H$G$"$k$J$N$K!"e(BUTF-8 e$B$+$i$N>l9g$O7k9=%P%i%P%i$K$J$ke(B
e$B$3$H$,B?$$$G$9!#$7$+$be(B UTF-8 e$B$+$ie(B (e$BFs%P%$%HL\0J9_e(B) e$B$rFCJL07$$e(B
e$B$9$k$H%F!<%V%k$NBg$-$5$,e(B 1/4 e$B$K$J$k$N$K!"B>$N%F!<%V%k$G$Oe(B
1/3 e$B$H$+e(B 1/2 e$B$H$+$7$+4|BT$G$-$J$$$G$9!#$h$C$Fe(B UTF-8 e$B$NFs%P%$%HL\e(B
[email protected]$1$rFCJL07$$$9$k$HAjEv%G!<%?$NNL$,8:$k$,!"JL$N%1!<%9$re(B
e$BFCJL07$$$7$F$b$=$l0J>e$=$s$J$K8:[email protected]$&$3$H$G$9!#e(B

e$B$?$H$($Pe([email protected],$Ne(B2bytee$B$KHO0O$r$$$l$k$H$9$k$H!"2>$j$Ke(B
from_utf8e$B0J30$Oe(B1/2e$B$K$J$k$H2>Dj$9$l$Pe(B

(128+2)*78 + (64+2)*985 = 75150byte

e$B$G!“Ls0l3d$N:o8:$K$J$j!“e(Bfrom_utf8e$B$N%F!<%V%k$b0lIt$7$+;H$C$F$$$Je(B
e$B$$$b$N$,$”$k$N$G!”$b$&>/!98z2L$,$"$k$N$G$O$J$$$+$H;W$&$N$G$9$,!#e(B