poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / wcsncpy.texi
blobc55c48b231e527e36e71056fef8ffb7cf5e4d8eb
1 @node wcsncpy
2 @section @code{wcsncpy}
3 @findex wcsncpy
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsncpy.html}
7 Gnulib module: wcsncpy
9 Portability problems fixed by Gnulib:
10 @itemize
11 @end itemize
13 Portability problems not fixed by Gnulib:
14 @itemize
15 @item
16 On Windows and 32-bit AIX platforms, @code{wchar_t} is a 16-bit type and therefore
17 cannot accommodate all Unicode characters.
18 @end itemize
20 Note: This function has no real use: It cannot be used for filling a fixed-size
21 record with a wide string, before writing it to a file, because the wide string
22 encoding is platform dependent and, on some platforms, also locale dependent.
23 And this function is @strong{not} appropriate for copying a wide string into a
24 bounded memory area, because you have no guarantee that the result will be
25 null-terminated. Even if you add the null character at the end yourself, this
26 function is inefficient (as it spends time clearing unused memory) and will
27 allow silent truncation to occur, which is not a good behavior for GNU programs.