Issue #26920: Fix not getting the locale's charset upon initializing the interpreter,
on platforms that do not have langinfo
diff --git a/Misc/NEWS b/Misc/NEWS
index a3db6e4..0b90319 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
Core and Builtins
-----------------
+- Issue #26920: Fix not getting the locale's charset upon initializing the
+ interpreter, on platforms that do not have langinfo.
+
- Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
when decode astral characters. Patch by Xiang Zhang.
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 5b5cc2b..71f23dd 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -315,7 +315,7 @@
initialized = 1;
_Py_Finalizing = NULL;
-#if defined(HAVE_LANGINFO_H) && defined(HAVE_SETLOCALE)
+#ifdef HAVE_SETLOCALE
/* Set up the LC_CTYPE locale, so we can obtain
the locale's charset without having to switch
locales. */