5 my($first,$second,$jnum);
6 $first = hex(substr($sjis,2,2));
7 $second = hex(substr($sjis,4,2));
10 $jnum = ($first - 0x81) * ((0xfd - 0x80)+(0x7f - 0x40));
12 $jnum = ($first - 0xe0 + (0xa0-0x81)) * ((0xfd - 0x80)+(0x7f - 0x40));
16 $jnum += $second - 0x80 + (0x7f-0x40);
20 $jnum += $second - 0x40;
28 open(CP932
, "<CP932.TXT") || die "cannot open CP932.TXT";
32 ($j, $u, $r) = split(/\t/,$_);
42 ## add eudc to $map here
48 printf ( "/* 0x%2XXX */\n", ( $i + 0x21));
52 if("" == ($map{($i * 94 + $j)}))
58 print $map{($i * 94 + $j)} . ",";
60 if( 7 == (($j + 1) % 8))
62 printf "/* 0x%2X%1X%1X*/\n", $i+0x21, 2+($j/16), (6==($j%16))?
0:8;
65 printf " /* 0x%2X%1X%1X*/\n", $i+0x21, 2+($j/16),(6==($j%16))?
0:8;