sksp2024-mcu/libucw/charset/misc/add-charnames

20 lines
423 B
Text
Raw Normal View History

2024-09-14 21:50:33 +02:00
#!/usr/bin/perl
#
# Add Unicode Character Names to a character set table file
# (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
#
open (UNI, "unidata/UnicodeData.txt") || die "No Unicode Data File";
while (<UNI>) {
($num,$name) = split /;/;
$name{$num} = $name;
}
close UNI;
while (<>) {
($code,$uni) = split /[ \t\n]+/;
$name = $name{$uni};
($name eq "") && ($name = "????");
print "$code\t$uni\t$name\n";
}