[issue4871] zipfile can't decrypt
STINNER Victor
report at bugs.python.org
Tue Jan 13 20:25:05 CET 2009
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
I created small archive with a password using zip 2.32 (Ubuntu Gutsy).
The unicode flag is not set and so ASCII charset is used to encode the
password. But my password was an unicode password using non-ASCII
characters and so I get an UnicodeEncodeError ('ascii' codec can't
encode character u'\xe9' ...). The user (me) doesn't expect such error
here :-/
If I encode the unicode password to bytes using
password.encode('utf-8'), it works as expected. So I would prefer to
just reject unicode for the password. Attached patch implements that.
Added file: http://bugs.python.org/file12722/zipfile_no_unicode_pasword.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4871>
_______________________________________
More information about the Python-bugs-list
mailing list