10 my $top = shift @ARGV || exit;
11 if (! -d $top) { exit; }
13 my $utf8 = find_encoding("utf8");
20 my $sjis = encode("cp932", $utf8->decode($str), Encode::FB_HTMLCREF);
21 if ($sjis =~ /&#\d{4,};/) {
29 my $target = shift @_;
31 print STDERR "checking '$target'\n";
32 opendir(my $dir, $target) || return $target;
33 my @entries = sort readdir($dir);
37 while (my $entry = shift @entries) {
38 next if ($entry =~ /^\.+$/);
40 print "'$target/$entry' contains non Shift_JIS character\n";
43 if (-d "$target/$entry") {
49 while (my $entry = pop @dirs) {
50 checkdir("$target/$entry");