From: mitty Date: Fri, 25 Jan 2013 11:01:38 +0000 (+0000) Subject: * remove needless export of NFKC X-Git-Url: http://lab.mitty.jp/git/?a=commitdiff_plain;h=2526624da64c681b411841def00f3a8c57eda429;p=lab.git * remove needless export of NFKC * change order of decode() and remove needless binmode git-svn-id: https://lab.mitty.jp/svn/lab/trunk@194 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- diff --git a/misc/findcombinable.pl b/misc/findcombinable.pl index 8d515d9..f3096c7 100755 --- a/misc/findcombinable.pl +++ b/misc/findcombinable.pl @@ -5,21 +5,19 @@ use warnings; 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; } @@ -37,7 +35,6 @@ sub checkdir { my @dirs; while (my $entry = shift @entries) { - $entry = $utf8->decode($entry); if (match($entry)) { print "'$target/$entry' can be composed\n"; next;