use utf8;
use Encode;
-use Unicode::Normalize qw(NFC NFKC);
-binmode STDOUT => 'encoding(utf8)';
-binmode STDERR => 'encoding(utf8)';
+use Unicode::Normalize qw(NFC);
my $top = shift @ARGV || exit;
if (! -d $top) { exit; }
my $utf8 = find_encoding("utf8");
-$top = $utf8->decode($top);
checkdir($top);
sub match {
my $str = shift @_;
+ $str = $utf8->decode($str);
if ($str ne NFC($str)) {
return 1;
}
my @dirs;
while (my $entry = shift @entries) {
- $entry = $utf8->decode($entry);
if (match($entry)) {
print "'$target/$entry' can be composed\n";
next;