Mercurial > hg > Applications > 14x14ja
diff findUnicode.pl @ 2:7f5d4dad9d6b
merge operation
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 15 Jun 2013 18:19:15 +0900 |
parents | 6ca82c74bf63 |
children | 8da43f287516 |
line wrap: on
line diff
--- a/findUnicode.pl Sat Jun 15 14:16:00 2013 +0900 +++ b/findUnicode.pl Sat Jun 15 18:19:15 2013 +0900 @@ -9,11 +9,13 @@ while(<>) { for my $ch ( /(.)/g ) { + next if (ord($ch)<128); + next if (ord($ch)>12288); # ignore CJKV $used{ord($ch)}++; } } -for my $bdf (<*.bdf>) { +for my $bdf (<[0-9]*.bdf>) { open(my $f,"<",$bdf); my %has; while(<$f>) { @@ -27,6 +29,7 @@ $no{$ch} ++ if (! defined $has{$ch}) ; } for my $ch ( sort {$a<=>$b} keys %no ) { - print "$ch is not in $bdf\n"; + my $hex = sprintf("%x",$ch); + print chr($ch)," $ch 0x$hex is not in $bdf\n"; } }