Stefan Holek added the comment:

A little more context perhaps:

The use-case is building Python distributions containing non-ASCII filenames. 
These seemingly "invalid" filenames can occur in real-life when the files have 
been created by, say, a 'git clone' operation.

So yes, I have Latin-1 bytes on the filesystem, even though my locale is UTF-8. 
And yes, Python 3 decodes that filename using surrogates. Creating .tar.gz 
distributions in this situation appears to work (even re-creating the foreign 
bytes when the archive is later extracted), whereas .zip archives fail in the 
way described above.

I was hoping zipfile could be made to work the same as tarfile in this regard. 
Concerns for standards certainly didn't keep tarfile from supporting 
surrogates. ;-)

----------

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

Reply via email to