projects
/
lab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1128c4
)
* treat filename with unknown coding set as UTF-8
author
mitty
<mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Sun, 10 Mar 2013 10:08:28 +0000
(10:08 +0000)
committer
mitty
<mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Sun, 10 Mar 2013 10:08:28 +0000
(10:08 +0000)
git-svn-id: https://lab.mitty.jp/svn/lab/trunk@204
7d2118f6
-f56c-43e7-95a2-
4bb3031d96e7
misc/save.pl
patch
|
blob
|
history
diff --git
a/misc/save.pl
b/misc/save.pl
index
5c5a1db
..
77b6fb1
100755
(executable)
--- a/
misc/save.pl
+++ b/
misc/save.pl
@@
-38,8
+38,16
@@
foreach my $url (@URLs) {
$decoder->decode($filename),
Encode::FB_HTMLCREF
);
- print ": $filename\n";
}
+ else {
+ print "utf8?";
+ $filename = encode(
+ $coding,
+ decode("utf8", $filename),
+ Encode::FB_HTMLCREF
+ );
+ }
+ print ": $filename\n";
my $suffix = 1;
my $savename = $filename;