mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-28180: Fix the implementation of PEP 538 on Android (GH-4334)
This commit is contained in:
parent
9e78dc2517
commit
1588be66d7
6 changed files with 90 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue