Changeset a1128c4 in lab.git for misc


Ignore:
Timestamp:
Mar 10, 2013 6:54:24 PM (12 years ago)
Author:
mitty <mitty@…>
Branches:
master, trunk
Children:
6eaca65
Parents:
a74d46a
Message:
  • convert to FB_HTMLCREF if there are malformed characters

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/save.pl

    ra74d46a ra1128c4  
    1414 
    1515my $ua  = LWP::UserAgent->new; 
    16 my $enc = find_encoding($coding); 
    1716 
    1817my @URLs; 
     
    3433        my $decoder = Encode::Guess->guess($filename); 
    3534        if (ref($decoder)) { 
    36             $filename = $enc->encode($decoder->decode($filename)); 
     35            print $decoder->name; 
     36            $filename = encode( 
     37                $coding, 
     38                $decoder->decode($filename), 
     39                Encode::FB_HTMLCREF 
     40            ); 
     41            print ": $filename\n"; 
    3742        } 
    3843         
Note: See TracChangeset for help on using the changeset viewer.