mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix for issue 6202
This commit is contained in:
parent
2cfca7977e
commit
fe8a3d6eeb
2 changed files with 2 additions and 36 deletions
|
@ -536,10 +536,8 @@ def resetlocale(category=LC_ALL):
|
|||
"""
|
||||
_setlocale(category, _build_localename(getdefaultlocale()))
|
||||
|
||||
if sys.platform in ('win32', 'darwin', 'mac'):
|
||||
if sys.platform.startswith("win"):
|
||||
# On Win32, this will return the ANSI code page
|
||||
# On the Mac, it should return the system encoding;
|
||||
# it might return "ascii" instead
|
||||
def getpreferredencoding(do_setlocale = True):
|
||||
"""Return the charset that the user is likely using."""
|
||||
import _locale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue