mirror of
https://github.com/python/cpython.git
synced 2025-10-13 10:23:28 +00:00
Issue #8784: Set tarfile default encoding to 'utf-8' on Windows.
Note: file system encoding cannot be None anymore (since r81190, issue #8610).
This commit is contained in:
parent
7909b0085a
commit
0f35e2c0f4
3 changed files with 8 additions and 5 deletions
|
@ -159,9 +159,10 @@ TOEXEC = 0o001 # execute/search by other
|
|||
#---------------------------------------------------------
|
||||
# initialization
|
||||
#---------------------------------------------------------
|
||||
ENCODING = sys.getfilesystemencoding()
|
||||
if ENCODING is None:
|
||||
ENCODING = "ascii"
|
||||
if os.name in ("nt", "ce"):
|
||||
ENCODING = "utf-8"
|
||||
else:
|
||||
ENCODING = sys.getfilesystemencoding()
|
||||
|
||||
#---------------------------------------------------------
|
||||
# Some useful functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue