diff --git a/Lib/locale.py b/Lib/locale.py index 9ae981f9a13..8a26744ed08 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -397,7 +397,7 @@ def resetlocale(category=LC_ALL): 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: