diff options
Diffstat (limited to 'tests/test-mbsrtowcs.c')
-rw-r--r-- | tests/test-mbsrtowcs.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-mbsrtowcs.c b/tests/test-mbsrtowcs.c index 7e8cc4a1ea..3c351f2346 100644 --- a/tests/test-mbsrtowcs.c +++ b/tests/test-mbsrtowcs.c @@ -72,6 +72,15 @@ main (int argc, char *argv[]) ASSERT (mbsinit (&state)); } +#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], "5") == 0 && MB_CUR_MAX > 1) + argv[1] = "2"; +#endif + if (argc > 1) { int unlimited; |