[issue1734346] patch for bug 1170311 "zipfile UnicodeDecodeError"

Alexey Borzenkov report at bugs.python.org
Mon May 5 20:40:13 CEST 2008


Alexey Borzenkov <snaury at users.sourceforge.net> added the comment:

Martin, I cleared the flag bit because filename was changed in-place, to
mark that filename does not need further processing. This was primarily
compatibility concern, to accommodate for situations where users try to
do such decoding in their own code (this way flag won't be there, so
their code won't trigger). Without clearing the flag bit, calling
_decodeFilenameFlags second time will fail, as well as any similar user
code.

I suggest that if users want to know if filename is unicode, they should
check that filename is of class unicode.

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1734346>
_____________________________________


More information about the Python-bugs-list mailing list