ファイル名がU#xxxxになっているzipファイル

unzip -U

http://www.info-zip.org/phpBB3/viewtopic.php?f=4&t=405



2014.7.6追記

unzip -U でもデコードされないzipファイルがある。(原因不明)
以下のPerlスクリプトを使って変換する。


# rename_unicode_file.pl
use Encode;
$regexp = 's/#U([0-9a-f]{4})/Encode::encode("cp932", decode_utf8(pack("U",hex($1))))/ge';

if (!@ARGV) {
@ARGV = ;
chomp(@ARGV);
}

foreach $_ (@ARGV) {
$old_name = $_;
eval $regexp;
die $@ if $@;
rename($old_name, $_) unless $old_name eq $_;
}
exit(0);

使い方は、


$ find . -name '*#U*' -exec rename_unicode_file.pl '{}' \;

ディレクトリを変換するとその下のファイルが変換されないので、
繰り返し実行する。