diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-16 14:34:56 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-16 15:53:45 +0100 |
commit | 653bc7d23e08ab61ee2382f8773f0a95d93ab871 (patch) | |
tree | cd8e2a40e56d4f946fa3174a7a461c537d33a5fc /doc | |
parent | 1ca5866371acd6b4bdcb1913d18cc14b7a8528c1 (diff) | |
download | gnulib-653bc7d23e08ab61ee2382f8773f0a95d93ab871.tar.gz |
mbrtowc, mbrtoc32 tests: Avoid test failure on Android ≥ 5.0.
* tests/test-mbrtowc.c (main): On Android 5.0 or newer, when testing
the "C" locale, verify that the encoding is UTF-8.
* tests/test-mbrtoc32.c (main): Likewise.
* doc/posix-functions/setlocale.texi: Mention the Android problems.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/posix-functions/setlocale.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/posix-functions/setlocale.texi b/doc/posix-functions/setlocale.texi index 11364d3901..6e232200f8 100644 --- a/doc/posix-functions/setlocale.texi +++ b/doc/posix-functions/setlocale.texi @@ -21,7 +21,7 @@ On Windows platforms (excluding Cygwin), @code{setlocale} understands different locale names, that are not based on ISO 639 language names and ISO 3166 country names. @item -On Android 4.3, which which doesn't have locales, the @code{setlocale} function +On Android < 5.0, which doesn't have locales, the @code{setlocale} function always fails. The replacement, however, supports only the locale names @code{"C"} and @code{"POSIX"}. @end itemize @@ -52,4 +52,10 @@ In addition any value is accepted for @code{LC_CTYPE}, and so NULL is never returned to indicate a failure to set locale. To verify category values, each category must be set individually with @code{setlocale(LC_COLLATE,"")} etc. +@item +On Android 5.0 and newer, the default locale (i.e.@: the locale in use when +@code{setlocale} was not called) is the @code{"C.UTF-8"} locale, not the +@code{"C"} locale. Additionally, a @code{setlocale} call that is meant to set +the @code{"C"} or @code{"POSIX"} locale actually sets an equivalent of the +@code{"C.UTF-8"} locale. @end itemize |