summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-09-08 17:35:16 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-09-08 17:35:16 (GMT)
commitcc16be85c0b7119854c00fb5c666825deef641cf (patch)
tree18b9a8020679f8a0e6e0dd1ecb5668024be499b7 /Lib/os.py
parentcfbd48bc56980823dd8e2560e0ce4e46e33e4e3d (diff)
downloadcpython-cc16be85c0b7119854c00fb5c666825deef641cf.zip
cpython-cc16be85c0b7119854c00fb5c666825deef641cf.tar.gz
cpython-cc16be85c0b7119854c00fb5c666825deef641cf.tar.bz2
Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py5
1 files changed, 1 insertions, 4 deletions
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 @@ 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