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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 明月我心

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

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