summaryrefslogtreecommitdiff
path: root/Programs
diff options
context:
space:
mode:
authorxdegaye <xdegaye@gmail.com>2017-11-12 12:45:59 +0100
committerGitHub <noreply@github.com>2017-11-12 12:45:59 +0100
commit1588be66d7b0eeebc4614309cd0fc837ff52776a (patch)
tree97210c1876d31fe2bc78d9eb029725fd33adbb32 /Programs
parent9e78dc25179a492550dc602e47e7f4d24e3c89a3 (diff)
downloadcpython-git-1588be66d7b0eeebc4614309cd0fc837ff52776a.tar.gz
bpo-28180: Fix the implementation of PEP 538 on Android (GH-4334)
Diffstat (limited to 'Programs')
-rw-r--r--Programs/python.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Programs/python.c b/Programs/python.c
index 4f6b9198c8..270a11babb 100644
--- a/Programs/python.c
+++ b/Programs/python.c
@@ -54,15 +54,8 @@ main(int argc, char **argv)
return 1;
}
-#ifdef __ANDROID__
- /* Passing "" to setlocale() on Android requests the C locale rather
- * than checking environment variables, so request C.UTF-8 explicitly
- */
- setlocale(LC_ALL, "C.UTF-8");
-#else
/* Reconfigure the locale to the default for this process */
- setlocale(LC_ALL, "");
-#endif
+ _Py_SetLocaleFromEnv(LC_ALL);
/* The legacy C locale assumes ASCII as the default text encoding, which
* causes problems not only for the CPython runtime, but also other