Kaydet (Commit) 0f35e2c0 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #8784: Set tarfile default encoding to 'utf-8' on Windows.

Note: file system encoding cannot be None anymore (since r81190, issue #8610).
üst 7909b008
...@@ -185,8 +185,8 @@ The following variables are available on module level: ...@@ -185,8 +185,8 @@ The following variables are available on module level:
.. data:: ENCODING .. data:: ENCODING
The default character encoding i.e. the value from either The default character encoding: ``'utf-8'`` on Windows,
:func:`sys.getfilesystemencoding` or :func:`sys.getdefaultencoding`. :func:`sys.getfilesystemencoding` otherwise.
.. seealso:: .. seealso::
......
...@@ -159,9 +159,10 @@ TOEXEC = 0o001 # execute/search by other ...@@ -159,9 +159,10 @@ TOEXEC = 0o001 # execute/search by other
#--------------------------------------------------------- #---------------------------------------------------------
# initialization # initialization
#--------------------------------------------------------- #---------------------------------------------------------
ENCODING = sys.getfilesystemencoding() if os.name in ("nt", "ce"):
if ENCODING is None: ENCODING = "utf-8"
ENCODING = "ascii" else:
ENCODING = sys.getfilesystemencoding()
#--------------------------------------------------------- #---------------------------------------------------------
# Some useful functions # Some useful functions
......
...@@ -421,6 +421,8 @@ C-API ...@@ -421,6 +421,8 @@ C-API
Library Library
------- -------
- Issue #8784: Set tarfile default encoding to 'utf-8' on Windows.
- Issue #8966: If a ctypes structure field is an array of c_char, convert its - Issue #8966: If a ctypes structure field is an array of c_char, convert its
value to bytes instead of str (as done for c_char and c_char_p). value to bytes instead of str (as done for c_char and c_char_p).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment