diff -r 808f01a0284f Programs/python.c --- a/Programs/python.c Wed Jan 18 14:45:11 2017 +0100 +++ b/Programs/python.c Wed Jan 18 15:02:51 2017 +0100 @@ -82,7 +82,9 @@ } /* Reconfigure with the overridden environment variables */ +#ifndef __ANDROID__ setlocale(LC_ALL, ""); +#endif } else { /* No C locale warning here, as Py_Initialize will emit one later */ } diff -r 808f01a0284f Python/pylifecycle.c --- a/Python/pylifecycle.c Wed Jan 18 14:45:11 2017 +0100 +++ b/Python/pylifecycle.c Wed Jan 18 15:02:51 2017 +0100 @@ -335,7 +335,11 @@ /* Set up the LC_CTYPE locale, so we can obtain the locale's charset without having to switch locales. */ +# ifdef __ANDROID__ + setlocale(LC_CTYPE, "C.UTF-8"); +# else setlocale(LC_CTYPE, ""); +# endif _emit_stderr_warning_for_c_locale(); #endif