惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
O
OpenAI News
V
V2EX
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
S
Schneier on Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
小众软件
小众软件
L
LINUX DO - 热门话题
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - Franky
Security Latest
Security Latest
S
SegmentFault 最新的问题
Project Zero
Project Zero
Spread Privacy
Spread Privacy
K
Kaspersky official blog
J
Java Code Geeks
V
Vulnerabilities – Threatpost
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
月光博客
月光博客
T
The Exploit Database - CXSecurity.com
L
Lohrmann on Cybersecurity
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
Scott Helme
Scott Helme
WordPress大学
WordPress大学
量子位
T
Threat Research - Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
宝玉的分享
宝玉的分享
Hugging Face - Blog
Hugging Face - Blog
AWS News Blog
AWS News Blog
Help Net Security
Help Net Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Simon Willison's Weblog
Simon Willison's Weblog
S
Secure Thoughts
博客园 - 【当耐特】
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
V
Visual Studio Blog
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
腾讯CDC
Cyberwarzone
Cyberwarzone
IT之家
IT之家
GbyAI
GbyAI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
云风的 BLOG
云风的 BLOG
T
Troy Hunt's Blog
D
Docker

博客园 - 明月我心

百度网盘的同步空间使用方式 windows10删除多出的oem分区 自己搭建anki同步服务器 linux设置自动更换壁纸 Node判断文件是否链接 解决Qualcomm Atheros AR8161 Gigabit Ethernet网卡Linux下坏掉的问题 Openbox中指定目录打开程序 Openbox简单支持平铺 linux关闭双显卡的方法 rdesktop共享剪贴板的问题 Apache FTPServer安装为Windows服务的问题 Dell Inspiron One2330连接WPA2-PSK的问题 12306快速输入验证码办法 rsync命令中的include参数顺序问题 gnome下使用x-tile平铺窗口 开始相信360是款好软件,见下图 adb shell后insufficient permissions for device的问题 Gentoo linux下Adobe AIR运行环境的安装 php升级到5.3后Discuz论坛不能使用的问题
linux下zip文件解压乱码的问题
明月我心 · 2017-07-04 · via 博客园 - 明月我心

因为编码问题,zip文件中的中文文件在linux下解压会出现乱码

如果你使用archlinux那么使用AUR安装unzip-natspec就可以解决这个问题

https://aur.archlinux.org/packages/unzip-natspec/

这个时候,使用unzip xxx.zip就可以正确解压文件

然后在file-roller归档管理器中操作,中文名称依然是乱码,据说是因为file-roller优先使用p7zip

删除p7zip后问题解决

然而我还想同时能够使用p7zip软件包,谁知道这个问题如何解决?

从这里https://git.gnome.org//browse/file-roller/下载代码研究,发现这样的逻辑

    /* give priority to 7z, unzip and zip that supports ZIP files better. */
    if ((strcmp (mime_type, "application/zip") == 0)
        || (strcmp (mime_type, "application/x-cbz") == 0))
    {
        if (_g_program_is_available ("7z", check_command)) {
            return capabilities;
        }
        if (!_g_program_is_available ("unzip", check_command)) {
            capabilities |= FR_ARCHIVE_CAN_READ;
        }
        if (!_g_program_is_available ("zip", check_command)) {
            capabilities |= FR_ARCHIVE_CAN_WRITE;
        }
        return capabilities;
    }

这里是写死的,看起来除了给代码打补丁是没什么好办法了

最后的解决办法,发现AUR中同样存在类似的软件包p7zip-natspec

https://aur.archlinux.org/packages/p7zip-natspec/

安装这个包应该就可以完美的解决问题吧,因为我已经使用上面的方法解决了问题,就不试这个了