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

推荐订阅源

W
WeLiveSecurity
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric
V
Visual Studio Blog
L
LangChain Blog
A
About on SuperTechFans
B
Blog
T
Tenable Blog
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
博客园 - 三生石上(FineUI控件)
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
U
Unit 42
WordPress大学
WordPress大学
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
C
Check Point Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
S
Securelist
Security Archives - TechRepublic
Security Archives - TechRepublic
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Latest news
Latest news
GbyAI
GbyAI
T
Troy Hunt's Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 热门话题
V2EX - 技术
V2EX - 技术
小众软件
小众软件
Google DeepMind News
Google DeepMind News
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
Netflix TechBlog - Medium
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed

博客园 - 明月我心

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

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