一直在linux下工作,免不了从网上下载zip格式文件压缩包,在debian下解压出来的文件文件名总是乱码。判断应该是由于zip文件是在windows环境压缩的。却没有好的解决方案,虽然google后有网友通过重新编译zip程序实现,但还是希望更优的解决方法。请问大家有没有遇到这样的问题,一般是怎样解决的?用mount挂载windows分区语言编码参数的方式我知道,但这里是直接下载到LINUX系统下的。
解决了。
unzip.pl
#!/usr/bin/perl
use Archive::Zip;
use Encode qw(decode encode);
sub usage {
print USAGE;
USAGE: unzip.pl ZIPFILE [FROMCODE=utf-8 [TOCODE=utf-8]]
USAGE
exit;
}
usage unless -e $ARGV[0];
$zip = Archive::Zip-new($ARGV[0]);
$from = $ARGV[1] || 'utf-8';
$to
這個轉行太牛了
--
To UNSUBSCRIBE, email to debian-chinese-gb-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4c46d9a1.8000...@gmail.com
unsubscribe
2010-07-21
liuyebo999
发件人: Alex Ye
发送时间: 2010-07-19 09:24:22
收件人: debian-chinese
抄送:
主题: unsubscribe
unsubscribe
4 matches
Mail list logo