zip包中文为乱码

Bug #1222684 reported by zhangchao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Kylin
Fix Released
High
ShuiLu Pi
ubuntukylin-default-settings
Fix Released
High
ShuiLu Pi

Bug Description

windows下打的zip包,其中中文在ubuntu kylin下显示为乱码

Tags: ubuntukylin
Revision history for this message
Jack Yu (jackyu) wrote :

能否通过default-settings包进行设置?

Changed in ubuntukylin:
assignee: nobody → zhangchao (zctgbhu)
importance: Undecided → High
milestone: none → final-beta
ShuiLu Pi (pishuilu1128)
Changed in ubuntukylin-default-settings:
assignee: nobody → ShuiLu Pi (pishuilu1128)
importance: Undecided → High
milestone: none → 1.0.5
milestone: 1.0.5 → none
ShuiLu Pi (pishuilu1128)
Changed in ubuntukylin-default-settings:
milestone: none → 1.0.7
Revision history for this message
Anthony Wong (anthonywong) wrote :

能否上传出问题的 zip 文件?这样方便测试,也可以作为测试基准。

ShuiLu Pi (pishuilu1128)
Changed in ubuntukylin-default-settings:
status: New → Fix Committed
Changed in ubuntukylin:
status: New → Fix Committed
Revision history for this message
ShuiLu Pi (pishuilu1128) wrote :
zhangchao (zctgbhu)
Changed in ubuntukylin:
status: Fix Committed → Triaged
importance: High → Wishlist
milestone: final-beta → none
Revision history for this message
Ma Hsiao-chun (mahsiaochun) wrote :

(简体中文)Windows下生成的zip文件一般为CP936编码,我之前写了一个小工具可以将这种zip文件转换成UTF-8编码:
https://github.com/maxiaojun/zip-fix

Revision history for this message
Jack Yu (jackyu) wrote :

OK, 我们学习一下:)。

Aron Xu (happyaron)
Changed in ubuntukylin-default-settings:
milestone: 1.0.7 → none
status: Fix Committed → New
Changed in ubuntukylin:
status: Triaged → New
Aron Xu (happyaron)
no longer affects: ubuntukylin-default-settings
tags: added: ubuntukylin
Revision history for this message
Aron Xu (happyaron) wrote :

其实有个hack,用这个脚本代替 unzip 命令使用:

#!/bin/sh
LANG=C 7z x -y "$1" | sed -n 's/^Extracting //p' | sed '1!G;h;$!d' | xargs convmv -f gbk -t utf8 --notest >/dev/null 2>/dev/null

Revision history for this message
zhangchao (zctgbhu) wrote :

在/etc/profile.d目录下增加一个文件,在此文件中定义UNZIP="-O GBK"和ZIPINFO="-O GBK"。
这个方法不会更改系统原有文件,是否更容易被接收些?我看到QT_QPA_PLATFORMTHEME环境变量就是用这个方法设置的。

Revision history for this message
Anthony Wong (anthonywong) wrote :

赞成 zhangchao 上面的提议。最理想是 unzip 和 7-zip 能首先自动识别文件编码,比如通过 libicu 来做,但在 14.10 可以先用 zhangchao 的建议。

Changed in ubuntukylin:
milestone: none → utopic-beta2
importance: Wishlist → High
description: updated
Changed in ubuntukylin:
status: New → Triaged
zhangchao (zctgbhu)
Changed in ubuntukylin:
assignee: zhangchao (zctgbhu) → ShuiLu Pi (pishuilu1128)
Revision history for this message
Anthony Wong (anthonywong) wrote :

What is the status of this bug?

zhangchao (zctgbhu)
Changed in ubuntukylin-default-settings:
assignee: nobody → ShuiLu Pi (pishuilu1128)
status: New → Fix Committed
importance: Undecided → High
Revision history for this message
zhangchao (zctgbhu) wrote :
Aron Xu (happyaron)
Changed in ubuntukylin-default-settings:
status: Fix Committed → Fix Released
Aron Xu (happyaron)
Changed in ubuntukylin:
status: Triaged → Fix Committed
Revision history for this message
shijing (shijing) wrote :

I tested the latest iso(922) , the problem was fixed.

Changed in ubuntukylin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.