Author xdegaye
Recipients martin.panter, xdegaye
Date 2017-11-08.14:16:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510150617.81.0.213398074469.issue28997@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-11-08 14:16:57xdegayesetrecipients: + xdegaye, martin.panter
2017-11-08 14:16:57xdegayesetmessageid: <1510150617.81.0.213398074469.issue28997@psf.upfronthosting.co.za>
2017-11-08 14:16:57xdegayelinkissue28997 messages
2017-11-08 14:16:57xdegayecreate