mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-91156: Use locale.getencoding()
instead of getpreferredencoding (GH-91732)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
efe7fd4170
commit
1317b70f89
14 changed files with 29 additions and 44 deletions
|
@ -1445,7 +1445,7 @@ def skip_if_buggy_ucrt_strfptime(test):
|
|||
global _buggy_ucrt
|
||||
if _buggy_ucrt is None:
|
||||
if(sys.platform == 'win32' and
|
||||
locale.getpreferredencoding(False) == 'cp65001' and
|
||||
locale.getencoding() == 'cp65001' and
|
||||
time.localtime().tm_zone == ''):
|
||||
_buggy_ucrt = True
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue