解决unzip解压中文乱码问题

使用 unzip XXX.zip 方式解压的时候会出现中文乱码

很多人推荐以下方式:

在windows执行命令,可显示字符集数字一般为936:
# chcp
// 解压时加上-O cp936,xxx为前面显示的数字
# unzip -O CPxxx

但是unzip已经不支持了

 

亲测有效的方式为:

1.解压文件 
# 7za xxx.zip
2. 执行以下命令:
# convmv -r -f utf8 -t iso88591 * --notest --nosmart && convmv -r -f gbk -t utf8 * --notest --nosmart

convmv无法执行需先安装:
#yum install p7zip convmv

7z安装参考:https://www.cnblogs.com/crazytata/p/10235812.html

相关参考链接:https://www.cnblogs.com/Rapheal/p/3664806.html

 

posted @ 2019-08-08 09:44  那钢绕指柔  阅读(5268)  评论(0编辑  收藏  举报