9 my $top = shift @ARGV || exit;
10 if (! -d $top) { exit; }
12 my $utf8 = find_encoding("utf8");
19 my $sjis = encode("cp932", $utf8->decode($str), Encode::FB_HTMLCREF);
20 if ($sjis =~ /&#\d{4,};/) {
28 my $target = shift @_;
30 print STDERR "# checking '$target'\n";
31 opendir(my $dir, $target) || return $target;
32 my @entries = sort grep { !m/^(\.|\.\.)$/g } readdir($dir);
36 while (my $entry = shift @entries) {
38 print "'$target/$entry' contains non Shift_JIS character\n";
41 if (-d "$target/$entry") {
47 while (my $entry = pop @dirs) {
48 checkdir("$target/$entry");