From 2526624da64c681b411841def00f3a8c57eda429 Mon Sep 17 00:00:00 2001 From: mitty Date: Fri, 25 Jan 2013 11:01:38 +0000 Subject: [PATCH] * 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 --- misc/findcombinable.pl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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; -- 1.7.9.5