commit | cc16be85c0b7119854c00fb5c666825deef641cf | [log] [tgz] |
---|---|---|
author | Steve Dower <steve.dower@microsoft.com> | Thu Sep 08 10:35:16 2016 -0700 |
committer | Steve Dower <steve.dower@microsoft.com> | Thu Sep 08 10:35:16 2016 -0700 |
tree | 18b9a8020679f8a0e6e0dd1ecb5668024be499b7 | |
parent | cfbd48bc56980823dd8e2560e0ce4e46e33e4e3d [diff] [blame] |
Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)
diff --git a/Lib/os.py b/Lib/os.py index 10d70ad..7379dad 100644 --- a/Lib/os.py +++ b/Lib/os.py
@@ -851,10 +851,7 @@ 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