OK. setuptools doesn't specify encoding at all. So locale-specific encoding is used. We can not fix it in short term.
On Wed, Mar 17, 2021 at 4:56 AM Brett Cannon firstname.lastname@example.org wrote:
On Mon, Mar 15, 2021 at 7:53 PM Inada Naoki email@example.com wrote:
I found .pth file is decoded by the default (i.e. locale-specific) encoding. https://github.com/python/cpython/blob/0269ce87c9347542c54a653dd78b9f60bb9fa...
pth files contain:
- import statements
For import statement, UTF-8 is the default Python code encoding. For paths, fsencoding is the right encoding. It is UTF-8 on Windows (excpet PYTHONLEGACYWINDOWSFSENCODING is set), and locale-specific encoding in Linux.
What encoding should we use?
- Keep status-quo.
What are packaging tools like pip and setuptools writing .pth files out as?