[issue10972] zipfile: add unicode option to the choose filename encoding

STINNER Victor report at bugs.python.org
Fri Jan 21 13:07:09 CET 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

7zip and WinRAR uses the same algorithm than ZipFile._encodeFilename(): try cp437 or use UTF-8. Eg. if a filename contains ∞ (U+221E), it is encoded to UTF-8.

WinZIP encodes all filenames to cp437: ∞ (U+221E) is replaced by 8 (U+0038), ☺ (U+263A) is replaced by... U+0001!

7zip, WinRAR and WinZIP are able to decode UTF-8 filenames (handle correctly the unicode flag).

----------
nosy: +alanmcintyre

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10972>
_______________________________________


More information about the Python-bugs-list mailing list