Ubuntu下压缩包内文件解压后乱码问题的解决

简介:
 

用到的工具是The Unarchiver项目提供的lsar/unar工具。
The Unarchiver项目主页:http://code.google.com/p/theunarchiver/


安装(12.04及以上):
代码:
sudo apt-get install unar


12.04以下或者想编译安装的朋友请参考:
viewtopic.php?f=35&t=353426


使用:
假设需要解压的ZIP包是foo.zip
代码:
lsar foo.zip #列出所有文件


如果列出的文件名已经正确
代码:
unar foo.zip #解压所有文件


如果列出的文件名还不正确
代码:
lsar -e GB18030 foo.zip #指定使用GB18030编码列出所有文件
unar -e GB18030 foo.zip #指定使用GB18030解压所有文件


注:GB18030编码文件名的ZIP文件一般由简体中文版Windows产生,对于繁体中文版Windows产生的ZIP文件可以尝试BIG5-HKSCS编码,对其他语种的常见编码不再赘述。通用的原则是用lsar测试出正确的编码以后,用unar解压。


参考:
http://manpages.ubuntu.com/manpages/pre ... sar.1.html
http://manpages.ubuntu.com/manpages/pre ... nar.1.html
相关文章
|
3月前
|
Ubuntu Linux 时序数据库
|
3月前
|
Ubuntu 安全 算法
Ubuntu通过gpg指令生成并本地密钥文件
GPG 是GNU Privacy Guard的缩写,是一个开源的加密软件,主要用于数据的安全性和隐私保护。GPG 是基于 OpenPGP 标准的实现,该标准定义了一种用于加密、签名和验证数据的标准格式。今天我们的实验就是在本地产生一个密钥文件。
48 0
|
4月前
|
Ubuntu Linux 数据安全/隐私保护
Ubuntu系统配置Samba实现与Windows系统的文件共享
Ubuntu系统配置Samba实现与Windows系统的文件共享
81 0
|
10月前
|
Ubuntu 数据安全/隐私保护 虚拟化
Ubuntu和Windows之间文件无损互传
Ubuntu和Windows之间文件无损互传
317 0
|
5月前
|
Ubuntu Linux
仓库 “https://mirrors.aliyun.com/docker-ce/linux/ubuntu una Release” 没有 Release 文件
仓库 “https://mirrors.aliyun.com/docker-ce/linux/ubuntu una Release” 没有 Release 文件
158 0
|
9月前
|
Ubuntu
Ubuntu中解压出现:bzip2: (stdin) is not a bzip2 file.
Ubuntu中解压出现:bzip2: (stdin) is not a bzip2 file.
236 0
|
10月前
|
Ubuntu Linux 开发工具
Ubuntu与window实现文件共享——Samba使用
Ubuntu与window实现文件共享——Samba使用
162 0
|
12月前
|
Ubuntu Linux Windows
ubuntu16.04安装MATLAB R2017b步骤详解(附完整文件包)
ubuntu16.04安装MATLAB R2017b步骤详解(附完整文件包)
340 0
ubuntu16.04安装MATLAB R2017b步骤详解(附完整文件包)
|
存储 Ubuntu Shell
Ubuntu 18.04 文件定时备份问题
Ubuntu 18.04 文件定时备份问题
184 0
Ubuntu 18.04 文件定时备份问题
|
Java
Ubuntu1804通过deb文件方式安装java
Ubuntu1804通过deb文件方式安装java
168 0
Ubuntu1804通过deb文件方式安装java