Summary | Unicode support in ZIP |
Queue | Horde Framework Packages |
Queue Version | Git develop |
Type | Enhancement |
State | Accepted |
Priority | 1. Low |
Owners | |
Requester | freecityhk (at) gmail (dot) com |
Created | 10/30/2008 (6040 days ago) |
Due | |
Updated | 08/05/2013 (4300 days ago) |
Assigned | |
Resolved | |
Milestone | |
Patch | No |
Version ⇒ Git develop
purpose bit flag
method of storing UTF-8 data, as defined by Info-ZIP. So that would
need to be implemented as well.
As mentioned in a previous ticket... I would really like to see us get
out of the compression library business. I would much rather use an
existing library that handles all these details for us. ZipArchive
would be perfect... except the pecl module seems to be broken (at
least it doesn't work for me on PHP 5.4, either stable or beta
version). And requiring built-in zip support to PHP seems to be too
invasive/too big of a step back from the present situation.
Version ⇒ HEAD
convertCharset on filenames to make them utf-8 if they aren't already
- that sound right?
convertCharset on filenames to make them utf-8 if they aren't already
- that sound right?
Maybe I explain it further
Zip format add Unicode filename support in version 6.3.0
(which works under WinZip 11.2+, WinRAR 3.8+, 7-Zip 4.58+)
http://en.wikipedia.org/wiki/ZIP_(file_format)#6.3
It is just implemented by setting the reserved bit 11 in general
purpose bit flag
http://www.pkware.com/documents/casestudies/APPNOTE.TXT
Then the filename and comment fields must be encoded using UTF-8.
Since Horde using UTF-8 by default, then everything works and just
setting this flag
ps. Zip version 6.3.2 implements an extra field for the storage of the
Unicode filename which I believe not useful in this case, and lead to
a more complicated implementation.
State ⇒ Feedback
#1841to me, except with a solution -can you please look and let me know if this is the same issue?
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Unicode support in ZIP
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ New
horde/lib/Horde/Compress/zip.php to support Unicode Filename in the
"Zip all attachment and download" feature
horde/lib/Horde/Compress/zip.php
replace
$cdrec .= "\x00\x00"; /* General purpose bit flag */
to
$cdrec .= "\x00\x08"; /* General purpose bit flag */
and
replace
$fr .= "\x00\x00"; /* General purpose bit flag. */
to
l $fr .= "\x00\x08"; /* General purpose bit flag. */