WCTOB(3)

NAME
wctob, wctob_l - convert a wide character to a single byte character

SYNOPSIS
#include <wchar.h>
int
wctob(wint_t wc);
int
wctob_l(wint_t wc, locale_t l);

DESCRIPTION
The wctob() and wctob_l() functions converts a wide character wc to a corresponding single byte character in the initial shift state of the current locale in the case of wctob() or of the locale provided as parameter to wctob_l(), see xlocale(3)

The behaviour of the wctob() is affected by the LC_CTYPE category of the current locale. While the behavior of wctob_l() depends on the LC_CTYPE category of the provided locale.

RETURN VALUES
These functions return:

EOF if wc is WEOF or if wc does not correspond to a valid single byte character representation.

(otherwise)
    a single byte character corresponding to wc.

ERRORS
No errors are defined.

SEE ALSO
btowc(3), setlocale(3), wcrtomb(3) xlocale(3)

STANDARDS
These functions conforms to POSIX 2008.