mbrtoc16
¶ISO C23 specification:
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf section 7.30.1.3.
POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/mbrtoc16.html
Portability problems fixed by Gnulib:
(size_t) -1
and set errno
to EILSEQ
:
glibc 2.36.
(size_t) -2
when the input
is empty:
glibc 2.19,
Android 11.
(size_t) -3
instead of a byte count when it
has stored a high surrogate, and returns a byte count instead of
(size_t) -3
when it has stored a low surrogate, on some platforms:
Android.
mbrtowc
recognizes on some platforms:
FreeBSD 13.2,
Solaris 11.4, MSVC 14.
Portability problems not fixed by Gnulib:
mbrtoc16
returns a char16_t
value, mbsinit
cannot be used to determine whether the function is ready to return
another char16_t
value. To do so, instead call mbrtoc16
again, with an appropriately incremented const char *
argument
and an appropriately decremented size_t
argument.