mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. (GH-7278)
This commit is contained in:
parent
6ea9d54dea
commit
8752dfbd1f
1 changed files with 5 additions and 1 deletions
|
@ -871,7 +871,11 @@ for character in (
|
|||
'\u20AC',
|
||||
):
|
||||
try:
|
||||
os.fsdecode(os.fsencode(character))
|
||||
# If Python is set up to use the legacy 'mbcs' in Windows,
|
||||
# 'replace' error mode is used, and encode() returns b'?'
|
||||
# for characters missing in the ANSI codepage
|
||||
if os.fsdecode(os.fsencode(character)) != character:
|
||||
raise UnicodeError
|
||||
except UnicodeError:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue