Changeset 198 in lab
- Timestamp:
- Jan 26, 2013 1:57:12 AM (11 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/misc/findsimplified.pl
r197 r198 6 6 7 7 use Encode; 8 use Unicode::Normalize qw(NFC);8 use Kanconvit; # http://kanconvit.ta2o.net/ 9 9 10 10 my $top = shift @ARGV || exit; … … 12 12 13 13 my $utf8 = find_encoding("utf8"); 14 my $ck = Kanconvit->new(); 14 15 15 16 checkdir($top); … … 19 20 20 21 $str = $utf8->decode($str); 21 if ($str ne NFC($str)) { 22 return $utf8->encode(NFC($str)); 22 my $jtext = $ck->conv_c2j($str); 23 if ($str ne $jtext) { 24 return $utf8->encode($jtext); 23 25 } 24 26 … … 36 38 my @dirs; 37 39 while (my $entry = shift @entries) { 38 if (my $composed = match($entry)) { 39 print "'$target/$entry' can be composed to '$composed'\n"; 40 if (my $japanese = match($entry)) { 41 print "mv '$target/$entry' \\\n"; 42 print " '$target/$japanese'\n"; 40 43 next; 41 44 }
Note: See TracChangeset
for help on using the changeset viewer.