实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

系统字体配置、中文显示和输入法问题
头像
lilydjwg
论坛版主
帖子: 4249
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#1

帖子 lilydjwg » 2010-01-24 15:29

唯一功能就是解压 Windows 下压缩的 zip 文件,并对文件名进行转码(转成 UTF-8),需要 Python3。

python2.x 版的在此: viewtopic.php?f=8&t=254215#p1701484

用法: ./gbkunzip file.zip

更新:
新的Python3版,在这里 http://lilydjwg.is-programmer.com/posts/16293.html ,之前的版本可能出现UnicodeEncodeError。
上次由 lilydjwg 在 2010-10-06 18:21,总共编辑 2 次。
头像
fanhe
帖子: 2357
注册时间: 2007-03-24 23:45

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#3

帖子 fanhe » 2010-01-24 20:42

我强烈建议楼主写一个python 2.x的
头像
peachcolor
帖子: 898
注册时间: 2006-05-20 14:03

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#4

帖子 peachcolor » 2010-01-24 21:12

unzip本来就可以的,unzip -O gbk xxx.zip就行了
头像
lilydjwg
论坛版主
帖子: 4249
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#5

帖子 lilydjwg » 2010-01-24 21:25

peachcolor 写了:unzip本来就可以的,unzip -O gbk xxx.zip就行了
升级后没有那个选项了……
头像
lilydjwg
论坛版主
帖子: 4249
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#6

帖子 lilydjwg » 2010-01-24 21:36

python2.6 下测试通过。
附件
gbkunzip.7z
(654 Bytes) 已下载 269 次
头像
lilydjwg
论坛版主
帖子: 4249
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

刚刚发现可以用火狐来读取文件列表——关键字:zip、乱码

#7

帖子 lilydjwg » 2010-01-24 22:04

刚刚发现可以用火狐来读取文件列表。

jar:file:///path/to/file!/
但不知为什么其中的文件打不开。
头像
npnufn
帖子: 1845
注册时间: 2005-10-14 15:56

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#8

帖子 npnufn » 2010-01-25 13:18

我遇到过的问题刚好相反,是linux下压缩的zip在windows理解压出来是乱码。
yunio:又一个支持linux的云存储:链接 (非邀请链接)。
BCM4313驱动正常无法联网的解决:这里
plank:轻巧漂亮的dock 介绍在这里
头像
lilydjwg
论坛版主
帖子: 4249
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#9

帖子 lilydjwg » 2010-01-25 13:49

npnufn 写了:我遇到过的问题刚好相反,是linux下压缩的zip在windows理解压出来是乱码。
使用 7z 或者 rar 格式吧。源里边有 rar 程序,共享版,但是用了很久了,依旧能正常使用。
头像
jiangkero
帖子: 704
注册时间: 2008-07-14 10:15

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#10

帖子 jiangkero » 2010-01-25 14:09

lin下win下的zip文件都没乱码的路过。。。。。。 :em02 :em02
头像
hiloncn
帖子: 52
注册时间: 2010-04-05 14:22

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#12

帖子 hiloncn » 2010-04-14 10:33

具体怎么用阿? 用说说详细点哦,我是菜鸟
头像
hiloncn
帖子: 52
注册时间: 2010-04-05 14:22

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#13

帖子 hiloncn » 2010-04-14 10:36

我下载了那个文件gbkunzip.zip,然后解压了,然后把解压出来的 放在终端执行了, 就没反应了阿
头像
lilydjwg
论坛版主
帖子: 4249
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#14

帖子 lilydjwg » 2010-04-14 12:07

hiloncn 写了:我下载了那个文件gbkunzip.zip,然后解压了,然后把解压出来的 放在终端执行了, 就没反应了阿

代码: 全选

gbkunzip GBK编码的zip文件
会解压到当前文件夹下。建议使用最新的版本(在这里 http://lilydjwg.is-programmer.com/posts/16293.html, 需要 Python3),因为之前的版本有点问题。
flay
帖子: 211
注册时间: 2010-01-25 9:27

Re: 实在是郁闷得不行,写了个gbkunzip——关键字:zip、乱码

#15

帖子 flay » 2011-08-10 12:28

ubuntu 10.10下安装python3

代码: 全选

$ sudo apt-get install python3
刚刚测试,很好。
回复