projects
/
lab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utils::get gives hashref tree from API
[lab.git]
/
misc
/
findnonsjis.pl
diff --git
a/misc/findnonsjis.pl
b/misc/findnonsjis.pl
index
1ae7aef
..
71e9a0a
100755
(executable)
--- a/
misc/findnonsjis.pl
+++ b/
misc/findnonsjis.pl
@@
-18,7
+18,8
@@
sub match {
my $sjis = encode("cp932", $utf8->decode($str), Encode::FB_HTMLCREF);
if ($sjis =~ /&#\d{4,};/) {
my $sjis = encode("cp932", $utf8->decode($str), Encode::FB_HTMLCREF);
if ($sjis =~ /&#\d{4,};/) {
- return 1;
+ Encode::from_to($sjis, "cp932", "utf8");
+ return $sjis;
}
return '';
}
return '';
@@
-34,8
+35,8
@@
sub checkdir {
my @dirs;
while (my $entry = shift @entries) {
my @dirs;
while (my $entry = shift @entries) {
- if (match($entry)) {
- print "'$target/$entry' contains non Shift_JIS character\n";
+ if (my $convert = match($entry)) {
+ print "'$target/$entry' can be converted to '$convert'\n";
next;
}
if (-d "$target/$entry") {
next;
}
if (-d "$target/$entry") {