From 3658b6cadcaf23e113090089596a9db6c2804eda Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 27 Mar 2023 09:41:46 +0200 Subject: Replace deprecated getdefaultlocale() with getlocale() --- feedgenerator/django/utils/encoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feedgenerator/django/utils/encoding.py b/feedgenerator/django/utils/encoding.py index 02bb65c..c1375f2 100644 --- a/feedgenerator/django/utils/encoding.py +++ b/feedgenerator/django/utils/encoding.py @@ -195,7 +195,7 @@ def filepath_to_uri(path): # given fallback encoding if the encoding is unsupported by python or could # not be determined. See tickets #10335 and #5846 try: - DEFAULT_LOCALE_ENCODING = locale.getdefaultlocale()[1] or 'ascii' + DEFAULT_LOCALE_ENCODING = locale.getlocale()[1] or 'ascii' codecs.lookup(DEFAULT_LOCALE_ENCODING) except: DEFAULT_LOCALE_ENCODING = 'ascii' -- cgit v1.2.1