Changeset 6f4fe5e in lab.git for misc/findnonsjis.pl
- Timestamp:
- Jan 24, 2013 10:32:47 PM (12 years ago)
- Branches:
- master, trunk
- Children:
- 89fbc5d
- Parents:
- cdcfe90
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/findnonsjis.pl
rcdcfe90 r6f4fe5e 6 6 use encoding 'utf-8'; 7 7 8 use Unicode::Japanese qw(unijp);8 use Encode; 9 9 10 10 my $top = shift @ARGV || exit; 11 11 if (! -d $top) { exit; } 12 13 my $utf8 = find_encoding("utf8"); 12 14 13 15 checkdir($top); … … 16 18 my $str = shift @_; 17 19 18 my $sjis = unijp($str)->sjis;20 my $sjis = encode("cp932", $utf8->decode($str), Encode::FB_HTMLCREF); 19 21 if ($sjis =~ /&#\d{4,};/) { 20 22 return 1;
Note: See TracChangeset
for help on using the changeset viewer.