Changeset 197 in lab


Ignore:
Timestamp:
Jan 26, 2013 1:38:41 AM (11 years ago)
Author:
mitty
Message:
  • output string contains numeric character references
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/misc/findnonsjis.pl

    r195 r197  
    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.