summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-11-16 07:24:20 +0100
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-11-16 07:24:20 +0100
commit0af37fbc56ae6aaccab23c642142744f4e83871f (patch)
treebcb8d10a466e5c84920c4cf93ff43e75b574affb
parent9e9e1607dc872543afe3bb506c9e31383a3cd28f (diff)
downloadcpython-0af37fbc56ae6aaccab23c642142744f4e83871f.tar.gz
Issue #26920: Fix not getting the locale's charset upon initializing the interpreter,
on platforms that do not have langinfo
-rw-r--r--Misc/NEWS3
-rw-r--r--Python/pylifecycle.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index a3db6e4a75..0b9031945f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 3.6.0 beta 4
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 5b5cc2b55e..71f23dd150 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -315,7 +315,7 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib)
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. */