diff options
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 |