The platform headers has the following macro:
#define MB_CUR_MAX __ctype_get_mb_cur_max()
where __ctype_get_mb_cur_max() tries to handle UTF-8 encodings.
However, even in Android 7.0 setlocale(LC_ALL, ""), which many
programs do at startup, doesn't work in that it sets the locale
as non-utf8:
https://android.googlesource.com/platform/bionic/+/nougat-release/libc/bionic/locale.cpp#139
So we just always consider us being in an utf-8 locale.
Also rebuild coreutils to fix#1136.
32-bit android uses 32-bit off_t by default. When building with
-D_FILE_OFFSET_BITS=64 with unified headers off_t are promoted
to 64-bit, but there are bugs in the toolchain and spotty support
for it in the platform (not all functions are available until
android-24, and the platform zlib is compiled with 32-bit off_t).
Also, unless every library&program is rebuilt with 64-bit off_t,
including user-built ones, we risk a mismatch between programs and
libraries which can cause serious (but sometimes subtle) runtime
failures.
As -D_FILE_OFFSET_BITS=64 is not that important for most users
(with mariadb requiring it as an exception), we drop the support
for now by patching it away in <sys/cdefs.h>.