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

推荐订阅源

爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
GRAHAM CLULEY
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V2EX - 技术
V2EX - 技术
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
Webroot Blog
Webroot Blog
PCI Perspectives
PCI Perspectives
L
LINUX DO - 最新话题
Hacker News: Ask HN
Hacker News: Ask HN
N
News and Events Feed by Topic
H
Heimdal Security Blog
H
Help Net Security
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
F
Full Disclosure
小众软件
小众软件
S
Securelist
罗磊的独立博客
NISL@THU
NISL@THU
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cisco Blogs
云风的 BLOG
云风的 BLOG
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
S
Schneier on Security
D
DataBreaches.Net
M
MIT News - Artificial intelligence
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
F
Fortinet All Blogs
T
Tenable Blog
The Register - Security
The Register - Security
C
Check Point Blog
AWS News Blog
AWS News Blog
Cloudbric
Cloudbric
C
CXSECURITY Database RSS Feed - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
博客园 - 叶小钗
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 司徒正美

博客园 - 明月我心

百度网盘的同步空间使用方式 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/

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