X-Git-Url: http://lab.mitty.jp/git/?a=blobdiff_plain;f=misc%2Ffindcombinable.pl;h=667d6bd1881fe3a4eea4818345d46d81af1fbffa;hb=214dd9dcbcea6edab078f572f790cdfbc497b98d;hp=f3096c7de884f2b5eac175bd98fde47f145722f2;hpb=2526624da64c681b411841def00f3a8c57eda429;p=lab.git diff --git a/misc/findcombinable.pl b/misc/findcombinable.pl index f3096c7..667d6bd 100755 --- a/misc/findcombinable.pl +++ b/misc/findcombinable.pl @@ -19,7 +19,7 @@ sub match { $str = $utf8->decode($str); if ($str ne NFC($str)) { - return 1; + return $utf8->encode(NFC($str)); } return ''; @@ -28,15 +28,15 @@ sub match { sub checkdir { my $target = shift @_; - print STDERR "checking '$target'\n"; + print STDERR "# checking '$target'\n"; opendir(my $dir, $target) || return $target; my @entries = sort grep { !m/^(\.|\.\.)$/g } readdir($dir); closedir($dir); my @dirs; while (my $entry = shift @entries) { - if (match($entry)) { - print "'$target/$entry' can be composed\n"; + if (my $composed = match($entry)) { + print "'$target/$entry' can be composed to '$composed'\n"; next; } if (-d "$target/$entry") {