Daniel Holth added the comment:

The current documentation says "Note There is no official file name encoding 
for ZIP files. If you have unicode file names, you must convert them to byte 
strings in your desired encoding before passing them to write(). WinZip 
interprets all file names as encoded in CP437, also known as DOS Latin."

This is bad advice because if you convert the filenames to bytes before passing 
them to zipfile, it won't remember that they should be unicode. Instead it 
should say

"The ZIP file format supports Unicode filenames. If you have unicode filenames, 
zipfile will encode them to and from utf-8 internally. If you pass bytes 
filenames to write() then they will be stored without a specified encoding."

I am not sure what current versions of WinZip or Windows file manager do.

----------

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

Reply via email to