6 (($n, $m, $c) = split(" ", $_, 3)) >= 3 || next;
12 $name0 = "jisx0208x0212x0213";
15 # These conversion tables between $code and
16 # Unicode were made from
18 # ftp://ftp.unicode.org/Public/MAPPINGS/$MAP{$NAME[0]},
19 # ftp://ftp.unicode.org/Public/MAPPINGS/$MAP{$NAME[1]}.
23 # Unicode(CP932) Unicode(JIS X 0208)
25 0x00A5, 0x216F, # YEN SIGN
26 0x00B5, 0x264C, # MICRO SIGN
27 0xFF3C, 0x2140, # FULLWIDTH REVERSE SOLIDUS 0x005C REVERSE SOLIDUS
28 0xFF5E, 0x2141, # FULLWIDTH TILDE 0x301C WAVE DASH
29 0x2225, 0x2142, # PARALLEL TO 0x2016 DOUBLE VERTICAL LINE
30 0xFF0D, 0x215D, # FULLWIDTH HYPHEN-MINUS 0x2212 MINUS SIGN
31 0xFFE0, 0x2171, # FULLWIDTH CENT SIGN 0x00A2 CENT SIGN
32 0xFFE1, 0x2172, # FULLWIDTH POUND SIGN 0x00A3 POUND SIGN
33 0xFFE2, 0x224C, # FULLWIDTH NOT SIGN 0x00AC NOT SIGN
36 ($_ == 0x00A5) && next;
37 ($_ == 0x00B5) && next;
38 $to_ucs[$from_ucs{$_}] = $_;
41 open(OUT, "> ${name0}_ucs.map");
42 foreach $name (@NAME) {
47 print "$name\t$map\t$code\n";
53 if ($name =~ /0208/) {
54 (($s, $i, $u) = split(" ")) || next;
60 $to_ucs[$i] || ($to_ucs[$i] = $u);
63 } elsif ($name =~ /0212/) {
64 (($i, $u) = split(" ")) || next;
75 (($p,$i,$e,$s,$u) = split(" ")) || next;
91 } elsif ($p =~ /^2/) {
102 /* JIS X 0208, JIS X 0212, JIS X 0213 (Japanese) */
104 static wc_uint16 jisx0208x02131_ucs_map[ 0x5E * 0x5E ] = {
107 for $i (0x21 .. 0x7E) {
108 for $j (0x21 .. 0x7E) {
109 $_ = $i * 0x100 + $j;
112 printf OUT " 0x%.4X,", $u;
116 printf OUT "\t/* %s 0x%.4X */\n", $to_ucs_jis[$_] ? "JIS X 0213-1" : "JIS X 0208", $_;
123 static wc_uint16 jisx0212x02132_ucs_map[ 0x5E * 0x5E ] = {
126 for $i (0x21 .. 0x7E) {
127 for $j (0x21 .. 0x7E) {
128 $_ = $i * 0x100 + $j;
131 printf OUT " 0x%.4X,", $u;
135 printf OUT "\t/* %s 0x%.4X */\n", $to_ucs2_jis[$_] ? "JIS X 0213-2" : "JIS X 0212", $_;
143 @ucs = sort { $a <=> $b } keys %from_ucs;
148 #define N_ucs_jisx0208_map $nucs
150 static wc_map ucs_jisx0208_map[ N_ucs_jisx0208_map ] = {
154 printf OUT " { 0x%.4X, 0x%.4X },\n", $_, $from_ucs{$_};
157 @ucs = sort { $a <=> $b } keys %from_ucs2;
163 #define N_ucs_jisx0212_map $nucs
165 static wc_map ucs_jisx0212_map[ N_ucs_jisx0212_map ] = {
169 printf OUT " { 0x%.4X, 0x%.4X },\n", $_, $from_ucs2{$_};
172 @ucs = sort { $a <=> $b } keys %from_ucs3;
178 #define N_ucs_jisx02131_map $nucs
180 static wc_map ucs_jisx02131_map[ N_ucs_jisx02131_map ] = {
184 printf OUT " { 0x%.4X, 0x%.4X },\n", $_, $from_ucs3{$_};
187 @ucs = sort { $a <=> $b } keys %from_ucs4;
193 #define N_ucs_jisx02132_map $nucs
195 static wc_map ucs_jisx02132_map[ N_ucs_jisx02132_map ] = {
199 printf OUT " { 0x%.4X, 0x%.4X },\n", $_, $from_ucs4{$_};
209 jisx0208 EASTASIA/JIS/JIS0208.TXT JIS X 0208 (Japanese)
210 jisx0212 EASTASIA/JIS/JIS0212.TXT JIS X 0212 (Japanese)
211 jisx0213 jisx0213code.txt JIS X 0213 (Japanese)