diff --git a/Lib/os.py b/Lib/os.py index 2e8ba921222..5c80e67eb4d 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -539,7 +539,7 @@ if supports_bytes_environ: def _fscodec(): encoding = sys.getfilesystemencoding() if encoding == 'mbcs': - errors = None # strict + errors = 'strict' else: errors = 'surrogateescape'