Matt Frank added the comment:

I am working on using my resources at Intel to put some pressure on Google to 
fix some of the (many) problems in the Bionic libc.

I have a sort of "polyfill" library that implements locale.h, langinfo.h, as 
well as the structure definitions for wchar.h, and it borrows the utf8 
mbs*towcs() and wcs*tombs() implementations from FreeBSD.  It implements a 
setlocale() and nl_langinfo() that starts in locale "C", fakes it as though the 
user's envvars are set to "C.UTF-8" (so if you call setlocale(LC_ALL, "") the 
encoding is changed to UTF-8).

But Bionic has been broken for many years, and it will most likely take many 
more years before I (or somebody) can arrange the right set of things to get it 
fixed.  It is not really in Google's interest to have people writing non-JVM 
code, so they seem to only grudgingly support it, their JVM APIs are the 
"walled garden" that keeps apps sticky to their platform, while allowing them 
to quickly switch to new processor architectures if they need to.

But all of that is not really germane to this bug.  The fact is that cpython, 
when compiled for a system with no langinfo.h creates an executable that does 
nothing but crash.

What other systems (other than Android) have no langinfo.h?  (Alternatively, 
why has this feature-test been in configure.ac for many years?)  If the 
solution for Android is "it's android's bug and they should fix it" then 
shouldn't we remove all the #ifdef HAVE_LANGINFO_H tests from the code and just 
let compilation fail on systems that don't have langinfo.h?  That is option (1) 
or (2) that I suggested above.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22747>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to