mbrtoc16
========

Gnulib module: mbrtoc16

Portability problems fixed by Gnulib:

  * This function is missing on most non-glibc platforms: glibc 2.15, macOS 11.1, FreeBSD 6.4, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 9, Android 4.4.

  * This function may crash when the first argument is NULL on some platforms: glibc 2.36.

  * In the C or POSIX locales, this function can return (size_t) -1 and set errno to EILSEQ: glibc 2.36.

  * This function returns 0 instead of (size_t) -2 when the input is empty: glibc 2.19, Android 11.

  * This function returns the total number of bytes that make up the multibyte character, not the number of bytes that were needed to complete the multibyte character, on some platforms: mingw.

  * This function returns (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.

  * This function does not recognize multibyte sequences that mbrtowc recognizes on some platforms: FreeBSD 13.2, Solaris 11.4, MSVC 14.

Portability problems not fixed by Gnulib:

  * After 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.