mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)
This commit is contained in:
parent
cfbd48bc56
commit
cc16be85c0
18 changed files with 618 additions and 836 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue