<div dir="ltr">On Thu, Feb 21, 2013 at 10:22 AM, Daniel Holth <span dir="ltr"><<a href="mailto:dholth@gmail.com" target="_blank">dholth@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im">On Thu, Feb 21, 2013 at 10:13 AM, Vinay Sajip <span dir="ltr"><<a href="mailto:vinay_sajip@yahoo.co.uk" target="_blank">vinay_sajip@yahoo.co.uk</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The Wheel specification talks about supporting Unicode in the filename of wheel<br>
files, but is mute on the subject of the names of the entries in the archive.<br>
<br>
It would be good to have clarity on this point. The Python docs for 2.x and 3.x<br>
tell us:<br>
<br>
There is no official file name encoding for ZIP files. If you have unicode<br>
file names, you must convert them to byte strings in your desired encoding<br>
before passing them to write(). WinZip interprets all file names as encoded<br>
in CP437, also known as DOS Latin.<br>
<br>
The "your desired encoding" is, I think, too loose for wheel files, as we want<br>
interoperability between implementations. We should mandate CP437 encoding if we<br>
want the files to be examinable on Windows in e.g. WinZip or 7-Zip. On Linux,<br>
file-roller seems to be unable to display Unicode, whether you use CP437 for the<br>
filenames or whether you use utf-8.<br></blockquote><div><br></div></div><div>I feign ignorance of any coding that is not utf-8. <a href="http://hg.python.org/cpython/file/d49685548a7a/Lib/zipfile.py#l404" target="_blank">http://hg.python.org/cpython/file/d49685548a7a/Lib/zipfile.py#l404</a></div>
<div><br></div><div><a href="http://hg.python.org/cpython/file/d49685548a7a/Lib/zipfile.py#l1000" target="_blank">http://hg.python.org/cpython/file/d49685548a7a/Lib/zipfile.py#l1000</a><br></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra" style>I will clarify the spec to include utf-8 as the filename encoding. The zip format allows it (set general purpose bit 11) but a lot of programs do not understand it. Python's zipfile supports utf-8 in zip.</div>
</div>