mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Mac OS X denies unencodable filenames (invalid utf-8)
This commit is contained in:
parent
fe17fd4a5d
commit
03c9e1dbc2
1 changed files with 2 additions and 1 deletions
|
@ -402,7 +402,8 @@ if os.name in ('nt', 'ce'):
|
|||
'Unicode filename tests may not be effective'
|
||||
% (TESTFN_UNENCODABLE, TESTFN_ENCODING))
|
||||
TESTFN_UNENCODABLE = None
|
||||
else:
|
||||
elif sys.platform != 'darwin':
|
||||
# Mac OS X denies unencodable filenames (invalid utf-8)
|
||||
try:
|
||||
# ascii and utf-8 cannot encode the byte 0xff
|
||||
b'\xff'.decode(TESTFN_ENCODING)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue