Ryan Gonzalez added the comment:
Ok...try going to Python/pylifecycle.c and changing lines 220-230 from:
#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
char* codeset = nl_langinfo(CODESET);
if (!codeset || codeset[0] == '\0') {
PyErr_SetString(PyExc_ValueError, "CODESET is not set or empty");
return NULL;
}
return get_codec_name(codeset);
#elif defined(__ANDROID__)
char* m = malloc(6);
strcpy(m, "ascii");
return m;
to:
#elif defined(__ANDROID__)
char* m = malloc(6);
strcpy(m, "ascii");
return m;
#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
char* codeset = nl_langinfo(CODESET);
if (!codeset || codeset[0] == '\0') {
PyErr_SetString(PyExc_ValueError, "CODESET is not set or empty");
return NULL;
}
return get_codec_name(codeset);
I just swapped the `elif`'s around.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23496>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com