| 1 |
%#!eptex -ini -etex |
| 2 |
\let\dump\relax |
| 3 |
\input plain |
| 4 |
\newlinechar=`^^J |
| 5 |
|
| 6 |
\newcount\tempcnta |
| 7 |
\newcount\CharCount |
| 8 |
|
| 9 |
\xdef\KINTERNAL{% |
| 10 |
\ifnum\ucs"3000="3000 \string\ucs |
| 11 |
\else\ifnum\euc"A1A1="A1A1 \string\euc |
| 12 |
\else\ifnum\sjis"8140="8140 \string\sjis |
| 13 |
\fi\fi\fi} |
| 14 |
|
| 15 |
{\escapechar-1 \xdef\CHAR{\string\char}\xdef\OMCHAR{\string\omathchar}} |
| 16 |
\def\CC#1{\expandafter\StripChar#1} |
| 17 |
\expandafter\def\expandafter\StripChar\expandafter#\expandafter1\CHAR#2{#2} |
| 18 |
\def\OC#1{\expandafter\StripOChar#1} |
| 19 |
\expandafter\def\expandafter\StripOChar\expandafter#\expandafter1\OMCHAR#2{#2} |
| 20 |
|
| 21 |
\CharCount=0\relax |
| 22 |
\tempcnta=0\relax |
| 23 |
%\ifnum\ucs"3000="3000 \else \tempcnta=256\relax \fi |
| 24 |
\loop\ifnum\tempcnta<"110000\relax |
| 25 |
%\iffontchar\jfont\tempcnta\relax |
| 26 |
\ifnum\ucs\toucs\tempcnta=\tempcnta\relax |
| 27 |
\advance\CharCount by 1\relax |
| 28 |
\ifnum\ucs"3000="3000 \else % boring for upTeX -> omitted |
| 29 |
\ifx\omathchardef\undefined %%%%% |
| 30 |
\message{^^J\KINTERNAL\the\tempcnta\space |
| 31 |
= \string\ucs\toucs\tempcnta} |
| 32 |
\else %%%%% |
| 33 |
\chardef\KnjInternal=\tempcnta\relax |
| 34 |
\omathchardef\KnjUCS=\toucs\tempcnta\relax |
| 35 |
\message{^^J\KINTERNAL\CC{\meaning\KnjInternal} |
| 36 |
= \string\ucs\OC{\meaning\KnjUCS} (\Uchar\tempcnta)} |
| 37 |
\fi %%%%% |
| 38 |
\fi |
| 39 |
\else |
| 40 |
\ifnum\ucs"3000="3000 % should not happen for upTeX |
| 41 |
\errhelp{}\errmessage{Should not happen: char \the\tempcnta} |
| 42 |
\fi |
| 43 |
\fi |
| 44 |
%\fi |
| 45 |
\advance\tempcnta by 1\relax |
| 46 |
\repeat |
| 47 |
|
| 48 |
\message{^^JNumber of valid characters: \the\CharCount^^J} |
| 49 |
% => for pTeX, should be 6879 (JIS X 0208) |
| 50 |
% => for upTeX, should be 1114112 (0..0x10FFFF) |
| 51 |
|
| 52 |
\end |