Eddie <skr...@gmail.com> added the comment:

Sorry, my bad.
I did tried it but with the wrong version (2.5). And it worked perfectly.

So sorry again for my mistake.

Anyways, I've found the error.

The problem is caused by different encodings used when zipping.

In open, the method is comparing b't\x82st.xml' against
b't\xc3\xa9st.xml', and of course they are different.
But they are no so different, because b't\x82st.xml' is
'tést'.encode('cp437') and b't\xc3\xa9st.xml' is 'tést'.encode(utf-8).

The problem arises because the open method supposes the filename is in
utf-8 encoding, but in __init__ it realizes that the encoding depends on
the flags. 
if flags & 0x800:
    filename = filename.decode.('utf-8')
else:
    filename = filename.decode.('cp437')

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4621>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to