Changeset bf1a1ea in lab.git


Ignore:
Timestamp:
Jan 26, 2013 1:38:41 AM (11 years ago)
Author:
mitty <mitty@…>
Branches:
master, trunk
Children:
44957a5
Parents:
7ec37bd
Message:
  • output string contains numeric character references

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@197 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/findnonsjis.pl

    rdfae53c rbf1a1ea  
    1919    my $sjis = encode("cp932", $utf8->decode($str), Encode::FB_HTMLCREF); 
    2020    if ($sjis =~ /&#\d{4,};/) { 
    21         return 1; 
     21        Encode::from_to($sjis, "cp932", "utf8"); 
     22        return $sjis; 
    2223    } 
    2324     
     
    3536    my @dirs; 
    3637    while (my $entry = shift @entries) { 
    37         if (match($entry)) { 
    38             print "'$target/$entry' contains non Shift_JIS character\n"; 
     38        if (my $convert = match($entry)) { 
     39            print "'$target/$entry' can be converted to '$convert'\n"; 
    3940            next; 
    4041        } 
Note: See TracChangeset for help on using the changeset viewer.