BTOWC(3C) Standard C Library Functions BTOWC(3C)

btowc, btowc_l - single-byte to wide-character conversion

#include <stdio.h>
#include <wchar.h>
wint_t btowc(int c);

#include <stdio.h>
#include <wchar.h>
#include <xlocale.h>
wint_t btowc_l(int c, locale_t loc);

The btowc() and btowc_l()functions determines whether c constitutes a valid (one-byte) character in the initial shift state.

The behavior of btowc() is affected by the LC_CTYPE category of the current locale. See environ(7). The function btowc_l() does not use the current locale, and instead operates on the locale specified by loc.

The btowc() function returns WEOF if c has the value EOF or if (unsigned char)c does not constitute a valid (one-byte) character in the initial shift state. Otherwise, it returns the wide-character representation of that character.

No errors are defined.

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability See below.
MT-Level MT-Safe

The btowc() function is Standard. The btowc_l() function is Uncommitted.

newlocale(3C), setlocale(3C), uselocale(3C), wctob(3C), attributes(7), environ(7), standards(7)

June 27, 2014 OmniOS