Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)

This commit is contained in:
Steve Dower 2016-09-08 10:35:16 -07:00
parent cfbd48bc56
commit cc16be85c0
18 changed files with 618 additions and 836 deletions

View file

@ -851,10 +851,7 @@ if supports_bytes_environ:
def _fscodec():
encoding = sys.getfilesystemencoding()
if encoding == 'mbcs':
errors = 'strict'
else:
errors = 'surrogateescape'
errors = sys.getfilesystemencodeerrors()
def fsencode(filename):
"""Encode filename (an os.PathLike, bytes, or str) to the filesystem