mbsnrtowcs(3) Library Functions Manual mbsnrtowcs(3) mbsnrtowcs - LIBRARY Standard C library (libc, -lc) #include size_t mbsnrtowcs(wchar_t dest[restrict .len], const char **restrict src, size_t nms, size_t len, mbstate_t *restrict ps); glibc (. feature_test_macros(7)): mbsnrtowcs(): glibc 2.10: _POSIX_C_SOURCE >= 200809L glibc 2.10: _BSD_SOURCE mbsnrtowcs() mbsrtowcs(3), , , *src, nms . dest NULL, mbsnrtowcs() nms *src , dest. dest len . *ps. mbrtowc(dest, *src, n, ps), n -- , , dest *src . : o . *src - , (size_t) -1 errno EILSEQ. o The nms limit forces a stop, or len non-L'\0' wide characters have been stored at dest. In this case, *src is left pointing to the next multibyte sequence to be converted, and the number of wide characters written to dest is returned. o The multibyte string has been completely converted, including the terminating null wide character ('\0') (which has the side effect of bringing back *ps to the initial state). In this case, *src is set to NULL, and the number of wide characters written to dest, excluding the terminating null wide character, is returned. , POSIX.1 -- ( ) . glibc . dest NULL, len , , . , ps NULL, , mbsnrtowcs(). , dest len . mbsnrtowcs() , , null. , (size_t) -1, errno EILSEQ. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |mbsnrtowcs() | | MT-Unsafe | | | | race:mbsnrtowcs/!ps | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. mbsnrtowcs() LC_CTYPE . NULL ps . . iconv(3), mbrtowc(3), mbsinit(3), mbsrtowcs(3) aereiae , Alexey , Azamat Hackimov , Dmitriy S. Seregin , Dmitry Bolkhovskikh , ITriskTI , Max Is , Yuri Kozlov , ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . mbsnrtowcs(3)