Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbrtowc.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbrtowc.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbrtowc.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbrtowc.html on line 8
Convert a multibyte character into a wide character (restartable)
#include <wchar.h>
size_t mbrtowc( wchar_t * pwc,
const char * s,
size_t n,
mbstate_t * ps );
- pwc
- A pointer to a wchar_t object where the function can
store the wide character.
- s
- A pointer to the multibyte character that you want to convert.
- n
- The maximum number of bytes in the multibyte character to convert.
- ps
- An internal pointer that lets mbrtowc() be a restartable
version of
mbtowc();
if ps is NULL, mbrtowc() uses its
own internal variable.
You can call
mbsinit()
to determine the status of this variable.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The mbrtowc() function converts single multibyte characters pointed to by s into wide characters pointed to by pwc, to a maximum of n bytes (not characters).
This function is affected by LC_TYPE.
- (size_t)-2
- After converting all n characters, the resulting conversion state indicates an incomplete multibyte character.
- (size_t)-1
- The function detected an encoding error before completing the next
multibyte character; the function sets
errno
to EILSEQ and leaves the resulting conversion state
undefined.
- 0
- The next completed character is a null character; the resulting conversion state is the same as the initial one.
- x
- The number of bytes needed to complete the next multibyte character, in which case the resulting conversion state indicates that x bytes have been converted.
- EILSEQ
- Invalid character sequence.
- EINVAL
- The ps argument points to an invalid object.
ANSI,
POSIX 1003.1
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
errno,
mblen(),
mbrlen(),
mbsinit(),
mbsrtowcs(),
mbstowcs(),
mbtowc()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbrtowc.html on line 180
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mbrtowc.html on line 180