[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

Inada Naoki report at bugs.python.org
Thu May 9 21:12:16 EDT 2019


Inada Naoki <songofacandy at gmail.com> added the comment:

> I dislike lying in the locale module. This change is basically useless with my PR 13230.


Note that Python produce "cpNNN" encoding name, not Windows.
https://github.com/python/cpython/blob/137be34180a20dba53948d126b961069f299f153/Modules/_localemodule.c#L395

So I don't think it is lie.  It is just "what encoding name we should choose when GetACP() returned 65001.".
With your PR 13230, cp65001 is truly utf-8.  So returning "utf-8" seems right behavior.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36778>
_______________________________________


More information about the Python-bugs-list mailing list