poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / mbrtowc.texi
blob897e4da942cbb9b01f9a8bc741706a21588c8934
1 @node mbrtowc
2 @section @code{mbrtowc}
3 @findex mbrtowc
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html}
7 Gnulib module: mbrtowc
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function is missing on some platforms:
13 Minix 3.1.8, HP-UX 11.00, IRIX 6.5, mingw.
14 @item
15 In the C or POSIX locales, this function can return @code{(size_t) -1}
16 and set @code{errno} to @code{EILSEQ}:
17 glibc 2.23.
18 @item
19 This function returns 0 instead of @code{(size_t) -2} when the input
20 is empty:
21 glibc 2.19.
22 @item
23 This function returns @code{(size_t) -1} instead of @code{(size_t) -2}
24 when the input is empty:
25 AIX 7.2.
26 @item
27 This function does not put the state into non-initial state when parsing an
28 incomplete multibyte character on some platforms:
29 AIX 7.2.
30 @item
31 This function stores a wide character when when parsing an incomplete multibyte
32 character on some platforms:
33 MSVC 14.
34 @item
35 This function returns the total number of bytes that make up the multibyte
36 character, not the number of bytes that were needed to complete the multibyte
37 character, on some platforms:
38 HP-UX 11.11, Solaris 11 2010-11, mingw, possibly MSVC 14.
39 @item
40 This function may not return 0 when parsing the NUL character on some platforms:
41 Solaris 9.
42 @end itemize
44 Portability problems not fixed by Gnulib:
45 @itemize
46 @item
47 On Windows and 32-bit AIX platforms, @code{wchar_t} is a 16-bit type and
48 therefore cannot accommodate all Unicode characters.
49 However, the ISO C11 function @code{mbrtoc32}, provided by Gnulib module
50 @code{mbrtoc32}, operates on 32-bit wide characters and therefore does not have
51 this limitation.
52 @end itemize