原文地址:https://www.zhihu.com/question/20523036
1 | unzip -O cp936 <zip file> |
经 Ubuntu 16.04 实验,该方法可行。
以下内容未经测试。
说明:如果提示没有 -O 参数,则需要给 unzip 打补丁
根据 https://github.com/ikohara/dpkg-unzip-iconv 上的安装步骤,给 unzip 打补丁,然后就可以用 -O 参数了
其它方法:
先安装 unar,以 Ubuntu 为例:
1 | sudo apt install -y unar |
使用方法:
1 | unar <zip file> |
这个工具会自动检测文件的编码,也可以通过-e 来指定。