Workshop o mikrokontrolérech na SKSP 2024.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
601 B

3 months ago
#!/usr/bin/perl
# Import charset tables from ftp.unicode.org
# (c) 2003, Robert Spalek <robert@ucw.cz>
foreach $file (@ARGV)
{
print "Converting $file\n";
($prefix, $filename) = $file =~ m|^(.*/)([^/]*)$|;
open(fi, "<$file") || die;
open(fo, ">$file-tr") || die;
print fo "# $filename charset file
# Imported from ftp://ftp.unicode.org/Public/MAPPINGS/$file
# (c) 2003, Robert Spalek <robert\@ucw.cz>
";
while (<fi>)
{
next if /^#/;
chop;
if (($code, $unicode, $comment) = /^0x(..)\t0x(....)\t#\t?(.*)$/)
{
print fo "$code\t$unicode\t$comment\n";
}
}
close(fo);
close(fi);
}