[issue10955] Possible regression with stdlib in zipfile

STINNER Victor report at bugs.python.org
Thu Jan 20 23:10:48 CET 2011


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

Le jeudi 20 janvier 2011 à 18:15 +0000, Amaury Forgeot d'Arc a écrit :
> But if the zip file contains the stdlib *and* some other custom
> modules with cp437 names, the whole operation will fail; it can be the
> case with py2exe applications.

The ASCII fallback is only used before the codec registry is loaded. I
suppose that you can use non-ASCII module names in the same ZIP file: if
you load them after that the codec registry is ready, it should work.

I copied the fix from Objects/unicodeobject.c which has also a similar
bootstrap "hack" to encode/decode filenames.

----------

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


More information about the Python-bugs-list mailing list