diff options
Diffstat (limited to 'tests/test-btowc.c')
-rw-r--r-- | tests/test-btowc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-btowc.c b/tests/test-btowc.c index e5918c36e9..8a803e5335 100644 --- a/tests/test-btowc.c +++ b/tests/test-btowc.c @@ -39,6 +39,15 @@ main (int argc, char *argv[]) ASSERT (btowc (EOF) == WEOF); +#ifdef __ANDROID__ + /* On Android ≥ 5.0, the default locale is the "C.UTF-8" locale, not the + "C" locale. Furthermore, when you attempt to set the "C" or "POSIX" + locale via setlocale(), what you get is a "C" locale with UTF-8 encoding, + that is, effectively the "C.UTF-8" locale. */ + if (argc > 1 && strcmp (argv[1], "3") == 0 && MB_CUR_MAX > 1) + argv[1] = "2"; +#endif + if (argc > 1) switch (argv[1][0]) { |