6 (($n, $m, $c) = split(" ", $_, 3)) >= 3 || next;
12 foreach $name (@NAME) {
17 print "$name\t$map\t$code\n";
22 open(OUT, "> ${name}_ucs.map");
26 (($i, $u) = split(" ")) || next;
35 # compatibility with GBK(CP936), GB18030
36 delete $from_ucs{$to_ucs[0x2124]};
37 delete $from_ucs{$to_ucs[0x212A]};
38 $from_ucs{0x00B7} = 0x2124;
39 $from_ucs{0x2014} = 0x212A;
40 $to_ucs[0x2124] = 0x00B7;
41 $to_ucs[0x212A] = 0x2014;
45 # These conversion tables between $code and
46 # Unicode were made from
48 # ftp://ftp.unicode.org/Public/MAPPINGS/$map.
53 static wc_uint16 ${name}_ucs_map[ 0x5E * 0x5E ] = {
56 for $i (0x21 .. 0x7E) {
57 for $j (0x21 .. 0x7E) {
61 printf OUT " 0x%.4X,", $u;
65 printf OUT "\t/* 0x%.4X */\n", $_;
69 @ucs = sort { $a <=> $b } keys %from_ucs;
75 #define N_ucs_${name}_map $nucs
77 static wc_map ucs_${name}_map[ N_ucs_${name}_map ] = {
80 printf OUT " { 0x%.4X, 0x%.4X },\n", $_, $from_ucs{$_};
91 gb2312 EASTASIA/GB/GB2312.TXT GB 2312 (Chinese)
92 gb12345 EASTASIA/GB/GB12345.TXT GB 12345 (Chinese)