[issue10614] ZipFile and CP932 encoding

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: In #10972, I propose to add an option for the filename encoding to UTF-8. But I would like to force UTF-8 to create a ZIP file, it doesn't concern the decompression of a ZIP file. Proposal of a specification to fix both issues at the same time. "default_enc

[issue10614] ZipFile and CP932 encoding

2010-12-04 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'm not sure why, but I got BadZipFile error now. Anyway, here is cp932 zip file to be created with python2.7. -- Added file: http://bugs.python.org/file19935/non-ascii-cp932.zip ___ Python tracker

[issue10614] ZipFile and CP932 encoding

2010-12-03 Thread STINNER Victor
STINNER Victor added the comment: @Hirokazu: Can you attach a small test archive? Yes, we can add a "default_encoding" attribute to ZipFile and add an optional default_encoding argument to its constructor. -- nosy: +haypo ___ Python tracker

[issue10614] ZipFile and CP932 encoding

2010-12-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: No, there is no indication in the zipfile that it deviates from the spec. That doesn't stop people from creating such zipfiles, anyway; many zip tools ignore the spec and use instead CP_ACP (which, of course, will then get misinterpreted if extracted on a di

[issue10614] ZipFile and CP932 encoding

2010-12-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The ZIP format specification mentions only cp437 and utf8: http://www.pkware.com/documents/casestudies/APPNOTE.TXT see Apeendix D. Do zip files created on Japanese Windows contain some information about the encoding they use? Or do some programs write cp

[issue10614] ZipFile and CP932 encoding

2010-12-02 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Currently, ZipFile only accepts ascii or utf8 as file name encodings. On Windows (Japanese), usually CP932 is used for it. So currently, when we melt ZipFile via py3k, non-ascii file name becomes strange. Can we handle this issue? (ie: adding encoding optio