#10679 closed enhancement (fixed)
Set general purpose bit 11 for utf-8 encoded filename in a zip file
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.4 |
Component: | general | Version: | 0.12-stable |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Now, Trac generates a zip file while downloading as zip in changeset and all attachments files as zip (0.13+). The filename of the zip file is encoded with utf-8. but "Language encoding flag" in zipinfo.flag_bits is unset.
If the bit is set, 7-zip extracts as unicode in Windows. If unset, it extracts broken filename. (confirmed on Windows XP.)
However, even if set, zip folder in Windows XP and 7 extracts broken filename.
Patches:
See also:
- APPENDIX D in http://www.pkware.com/documents/casestudies/APPNOTE.TXT
- latest zipfile.py at http://hg.python.org/cpython/file/6b9c1adce91e/Lib/zipfile.py#l363
Attachments (2)
Change History (5)
by , 13 years ago
Attachment: | zip-filename-utf8-0.12.diff added |
---|
by , 13 years ago
Attachment: | zip-filename-utf8-trunk.diff added |
---|
follow-up: 2 comment:1 by , 13 years ago
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed in [11043/branches/0.12-stable] and [11044/trunk].
So I suppose this would fix #4432?
I think that it should keep open, because Zip folder in Windows cannot handle the bit.
I think that Windows users need "encoding for zip archive" option in trac.ini and user preference.
comment:3 by , 12 years ago
Owner: | set to |
---|
We missed that convention when we talked about which encoding to use. Nice! So I suppose this would fix #4432?