8 use Unicode::Normalize qw(NFC NFKC);
9 binmode STDOUT => 'encoding(utf8)';
10 binmode STDERR => 'encoding(utf8)';
12 my $top = shift @ARGV || exit;
13 if (! -d $top) { exit; }
15 my $utf8 = find_encoding("utf8");
16 $top = $utf8->decode($top);
23 if ($str ne NFC($str)) {
31 my $target = shift @_;
33 print STDERR "checking '$target'\n";
34 opendir(my $dir, $target) || return $target;
35 my @entries = sort readdir($dir);
39 while (my $entry = shift @entries) {
40 next if ($entry =~ /^\.+$/);
41 $entry = $utf8->decode($entry);
43 print "'$target/$entry' can be composed\n";
46 if (-d "$target/$entry") {
52 while (my $entry = pop @dirs) {
53 checkdir("$target/$entry");