Content-type: text/html
wctob - Converts a wide character to a single byte in multibyte-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:
wctob(): ISO C
Refer to the standards(5) reference page for more information about industry standards and associated tags.
Points to a variable containing a wide-character value.
The wctob() function determines if a wide-character value constitutes a valid single-byte character in the initial shift state from a multibyte codeset. If so, the function returns the corresponding multibyte character. This function provides a wide-character to multibyte-character format conversion correctly sized for the %c conversion specifier that is permitted in calls to *printf() functions. In general, use either the wctomb() or wcrtomb() function to perform wide-character to multibyte-character format conversions of single characters.
The wctob() function returns one of the following: The counterpart multibyte-character value, if wc can be converted to a multibyte character that is 1 byte in length and in the initial shift state EOF, if wc does not correspond to a valid multibyte character that is 1 byte in length and in the initial shift state
The wctob() function sets errno to the specified value for the following conditions: An invalid character value is encountered.
Functions: btowc(3), mblen(3), mbtowc(3), wctomb(3), mbstowcs(3), wcstombs(3)
Files: locale(4) delim off