Content-type: text/html
btowc - Converts a single byte from multibyte-character to wide-character format
Standard C Library (libc.so, libc.a)
#include <stdlib.h> #include <wchar.h>
Interfaces documented on this reference page conform to industry standards as follows:
btowc(): ISO C
Refer to the standards(5) reference page for more information about industry standards and associated tags.
Points to a variable containing a single-byte character.
The btowc() function determines if a single-byte value constitutes a valid character in the initial shift state from a multibyte codeset. If so, the function returns the corresponding wide-character value. This function provides a multibyte-character to wide-character format conversion correctly sized for the %c conversion specifier that is permitted in calls to *printf() functions. In general, use either the mbtowc() or mbrtowc() function to perform multibyte-character to wide-character format conversions of single characters.
The btowc() function returns one of the following: The counterpart wide-character value, if c contains a valid multibyte character in the initial shift state WEOF, if c contains EOF or does not constitute a valid character in the initial shift state from a multibyte codeset
The btowc() function sets errno to the values specified for the following conditions: An invalid character value was encountered.
Functions: mblen(3), mbtowc(3), wctob(3), wctomb(3), mbstowcs(3), wcstombs(3)
Files: locale(4) delim off