]> mj.ucw.cz Git - libucw.git/blob - charset/misc/mkuni
rewritten, enhanced, updated, fixed
[libucw.git] / charset / misc / mkuni
1 #!/usr/bin/perl
2 #
3 #  Add Unicode Character Names to a character set table file
4 #  (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
5 #
6
7 open (UNI, "/tmp/unicode") || die "No Unicode Data File";
8 while (<UNI>) {
9         ($num,$name) = split /;/;
10         $name{$num} = $name;
11 }
12 close UNI;
13
14 while (<>) {
15         ($code,$uni) = split /[ \t\n]+/;
16         $name = $name{$uni};
17         ($name eq "") && ($name = "????");
18         print "$code\t$uni\t$name\n";
19 }