mbrtoc32
========

Gnulib module: mbrtoc32 or mbrtoc32-regular

Portability problems fixed by either Gnulib module mbrtoc32 or mbrtoc32-regular:

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

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

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

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

Portability problems fixed by Gnulib module mbrtoc32-regular:

  * This function can map some multibyte characters to a sequence of two or more Unicode characters, and may thus return (size_t) -3. No known implementation currently (2023) behaves that way, but it may theoretically happen. With the mbrtoc32-regular module, you have the guarantee that the Gnulib-provided mbrtoc32 function maps each multibyte character to exactly one Unicode character and thus never returns (size_t) -3.

  * This function behaves incorrectly when converting precomposed characters from the BIG5-HKSCS encoding: glibc 2.36.

Portability problems not fixed by Gnulib:

  * This function is only defined as an inline function on some platforms: Haiku 2020.

Note: If you want the guarantee that the char32_t values returned by this function are Unicode code points, you also need to request the uchar-c23 module.