mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
This stopped working on Windows, due to a reference to the non-existent
_locale.getdefaultlocale. Guessing a leading underscore was intended, but don't really understood this stuff (locale looks like Spanish for the opposite of global to me <wink>).
This commit is contained in:
parent
bc5e3cc34f
commit
a326f47a13
@ -397,7 +397,7 @@ if sys.platform in ('win32', 'darwin', 'mac'):
|
||||
def getpreferredencoding(do_setlocale = True):
|
||||
"""Return the charset that the user is likely using."""
|
||||
import _locale
|
||||
return _locale.getdefaultlocale()[1]
|
||||
return _locale._getdefaultlocale()[1]
|
||||
else:
|
||||
# On Unix, if CODESET is available, use that.
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user