This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, giomach
Date 2020-11-09.00:14:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604880852.13.0.51574187687.issue42293@roundup.psfhosted.org>
In-reply-to
Content
This looks to be a bug in the constructor of pip's BuildEnvironment class:

https://github.com/pypa/pip/blob/a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a/src/pip/_internal/build_env.py#L82

Python 3 source files are UTF-8 by default, but text files default to the platform's preferred encoding, unless overridden by Python's UTF-8 mode. It is thus a mistake to create "sitecustomize.py" without explicitly specifying UTF-8 as the encoding. 

The preferred encoding in Windows is the process active code page, which is the system code page, unless, in Windows 10 only, it's overridden to use UTF-8 by the application manifest's "activeCodePage" setting. The system code page is usually a legacy code page, such as 1252, unless, in Windows 10 only, it's set to UTF-8 or the system language is Unicode only (e.g. Hindi).
History
Date User Action Args
2020-11-09 00:14:12eryksunsetrecipients: + eryksun, giomach
2020-11-09 00:14:12eryksunsetmessageid: <1604880852.13.0.51574187687.issue42293@roundup.psfhosted.org>
2020-11-09 00:14:12eryksunlinkissue42293 messages
2020-11-09 00:14:11eryksuncreate