]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-104783: locale.getencoding() fallback uses FS encoding (#105381)
authorVictor Stinner <vstinner@python.org>
Tue, 6 Jun 2023 14:55:21 +0000 (16:55 +0200)
committerGitHub <noreply@github.com>
Tue, 6 Jun 2023 14:55:21 +0000 (16:55 +0200)
commitb1a91d26c67250ff7abeb20064e7766096604001
tree8d93339fa3dd90aae408c5ff63b0a71fd409f64d
parent3a975b5e92736cd2f68a09aa71a17d373b9355e9
gh-104783: locale.getencoding() fallback uses FS encoding (#105381)

The locale.getencoding() function now uses
sys.getfilesystemencoding() if _locale.getencoding() is missing,
instead of calling locale.getdefaultlocale().
Lib/locale.py
Lib/test/test_locale.py