Xavier de Gaye <xdeg...@gmail.com> added the comment: PEP 538 is implemented now in the master branch.
Closing this issue as out of date for the following reasons: a) PR 4334 adds locale coercion for Android to the implementation of PEP 538 (and test_nonascii succeeds with this PR). b) With the current implementation of PEP 538 and without PR 4334 (thus lacking locale coercion on Android), test_nonascii also does not fail on Android. Conclusion: Because of b) the reason that test_nonascii was failing is not a problem of environment variables since locale coercion is missing. The readline library does indeed look up the "LANG" and "LC_ALL" locale environment variables first and if one is set the library uses it to set LC_CTYPE [1]. But when none of these environment variables is found, then readline gets the locale by calling setlocale (LC_CTYPE, (char *)NULL). In the current implementation of PEP 538 test_nonascii succeeds now in b) because setlocale(LC_ALL, "C.UTF-8") is called now by Python upon starting up when __ANDROID__ is defined. [1] search for _rl_init_eightbit () and _rl_get_locale_var in git.savannah.gnu.org/cgit/readline.git/tree/nls.c ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue28997> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com