Jeremy Kloth <jeremy.kloth+python-trac...@gmail.com> added the comment:
The existing re-code solution is being triggered, as the `errors` in this case is 'surrogateescape' with an encoding of 'cp1252'. Here, pip is using subprocess.Popen() to have Python run setup.py. During execution, a filename, 'taqdir\\\u0634\u0645\u0627\u0631.py', which has characters not encodable in cp1252. I think that here, Python is not configuring its stdin/stdout/stderr streams correctly when run as a subprocess connected to pipes. Or, at least, subprocess.Popen() isn't passing the right (or enough) information to Python to get itself configured. There should ultimately be a way to have Python (in a subprocess, on Windows) pass through Unicode untouched to its calling process. I suppose it would mean setting the PYTHONIOENCODING envvar when using subprocess. After all that, it seems that: 1) pip needs to be changed to support calling Python subprocesses to enable lossless unicode transmission, 2) change the `errors` check in distutils.log to include 'surrogateescape'? (the heart of this issue) ---------- nosy: +jkloth _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34421> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com