8 use Unicode::Normalize qw(NFC);
10 my $top = shift @ARGV || exit;
11 if (! -d $top) { exit; }
13 my $utf8 = find_encoding("utf8");
20 $str = $utf8->decode($str);
21 if ($str ne NFC($str)) {
22 return $utf8->encode(NFC($str));
29 my $target = shift @_;
31 print STDERR "# checking '$target'\n";
32 opendir(my $dir, $target) || return $target;
33 my @entries = sort grep { !m/^(\.|\.\.)$/g } readdir($dir);
37 while (my $entry = shift @entries) {
38 if (my $composed = match($entry)) {
39 print "'$target/$entry' can be composed to '$composed'\n";
42 if (-d "$target/$entry") {
48 while (my $entry = pop @dirs) {
49 checkdir("$target/$entry");