Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b99d1cd commit da2706bCopy full SHA for da2706b
2 files changed
Misc/NEWS
@@ -12,6 +12,10 @@ What's New in Python 3.1 alpha 0
12
Core and Builtins
13
-----------------
14
15
+- Issue #2173: When getting device encoding, check that return value of
16
+ nl_langinfo is not the empty string. This was causing silent build
17
+ failures on OS X.
18
+
19
- Issue #4597: Fixed several opcodes that weren't always propagating
20
exceptions.
21
Modules/posixmodule.c
@@ -6724,7 +6724,7 @@ device_encoding(PyObject *self, PyObject *args)
6724
#elif defined(CODESET)
6725
{
6726
char *codeset = nl_langinfo(CODESET);
6727
- if (codeset)
+ if (codeset != NULL && codeset[0] != 0)
6728
return PyUnicode_FromString(codeset);
6729
}
6730
#endif
0 commit comments