wctob(), wctob_l()

convert wide character to single byte 

Function


SYNOPSIS

#include <stdio.h>

#include <wchar.h>

int wctob(wint_t c);

#include <locale.h>

int wctob_l(wint_t c, locale_t locale);


DESCRIPTION

The wctob() function determines whether the specified character corresponds to a member of the extended character set whose character representation is a single byte when in the initial shift state. The behavior of this function is affected by the LC_CTYPE category of the current locale.

The _l-suffixed version take an explicit locale argument, while the non- suffixed versions use the current global or per-thread locale.


PARAMETERS

c 

Is the character to test.

locale 

Is a locale_t perhaps returned by newlocale() or LC_GLOBAL_LOCALE or 0 for the current thread locale set with uselocale().


RETURN VALUES

The wctob() and wctob_l() functions returns EOF if c does not correspond to a character with length one in the initial shift state. Otherwise, it returns the single-byte representation of the character.


CONFORMANCE

px1_2001;.


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

The wctob() function is MT-Safe as long as no thread calls setlocale() while this function is executing.

The function wctob_l() is MT-Safe as long as no thread calls freelocale() on locale while this function is executing.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
btowc(), btowc_l(), newlocale(), setlocale()


PTC MKS Toolkit 10.4 Documentation Build 39.