<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Feb 9, 2016, at 17:37, Steve Dower <<a href="mailto:python@stevedower.id.au">python@stevedower.id.au</a>> wrote:</div><div><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;">Could we perhaps redefine bytes paths on Windows as utf8 and use Unicode everywhere internally?<br></div></div></div></blockquote><div><br></div><div>When you receive bytes from argv, stdin, a text file, a GUI, a named pipe, etc., and then use them as a path, Python treating them as UTF-8 would break everything.</div><div><br></div><div>Plus, the problem only exists in Python 2, and Python is not going to fix Unicode support in Python 2, both because it's too late for such a major change in Python 2, and because it's probably impossible* (which is why we have Python 3 in the first place). </div><br><blockquote type="cite"><div><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;">I really don't like the idea of not being able to use bytes in cross platform code. Unless it's become feasible to use Unicode for lossless filenames on Linux - last I heard it wasn't.<br></div></div></div></blockquote><div><br></div><div>It is, and has been for years. Surrogate escaping solved the linux problem. That doesn't help for Python 2, but again, it's too late for Python 2.</div><div><br></div><div><br></div><div>* Well, maybe in the future, some linux distros will bite the same bullet OS X did and mandate that filesystem drivers must expose UTF-8, doing whatever transcoding or other munging is necessary under the covers, to be valid. But I'm guessing any such distros will be all-Python-3 long before then, and the people using Python 2 will also be using old versions or conservative distros.</div></body></html>