3 # Convert ".enc" file from the CStoCS package to UCS-2 character mapping
4 # (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
7 open (MAP, "cstocs-names") || die "No charname file";
10 ($c,$uni) = split /[ \t]+/;
11 # if (defined $um{$uni}) { print "Warning: $uni redefined\n"; }
19 ($_,$c,$name) = split /[\t ]+/;
21 if (!defined $code{$name}) { die "$name unknown"; }
22 $u{$c} = $code{$name};
26 for ($i=0; $i<256; $i++) {
27 $v = (defined $u{$i}) ? $u{$i} : ($i < 128 ? sprintf("%04X", $i) : "FFFD");
28 printf "%02X\t%s\n", $i, $v;