Skip to content

Commit 8b50eb1

Browse files
committed
get_encoding -> getencoding
1 parent 104206a commit 8b50eb1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/locale.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def getpreferredencoding(do_setlocale=True):
657657
"""Return the charset that the user is likely using."""
658658
if sys.flags.utf8_mode:
659659
return 'UTF-8'
660-
return get_encoding()
660+
return getencoding()
661661
else:
662662
# On Unix, if CODESET is available, use that.
663663
def getpreferredencoding(do_setlocale=True):
@@ -667,15 +667,15 @@ def getpreferredencoding(do_setlocale=True):
667667
return 'UTF-8'
668668

669669
if not do_setlocale:
670-
return get_encoding()
670+
return getencoding()
671671

672672
old_loc = setlocale(LC_CTYPE)
673673
try:
674674
try:
675675
setlocale(LC_CTYPE, "")
676676
except Error:
677677
pass
678-
return get_encoding()
678+
return getencoding()
679679
finally:
680680
setlocale(LC_CTYPE, old_loc)
681681

0 commit comments

Comments
 (0)