Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wctob(3c) [opensolaris man page]

wctob(3C)						   Standard C Library Functions 						 wctob(3C)

NAME
wctob - wide-character to single-byte conversion SYNOPSIS
#include <stdio.h> #include <wchar.h> int wctob(wint_t c); DESCRIPTION
The wctob() function determines whether c 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. See environ(5) RETURN VALUES
The wctob() function 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 that character. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe with exceptions | +-----------------------------+-----------------------------+ SEE ALSO
btowc(3C), setlocale(3C), attributes(5), environ(5), standards(5) NOTES
The wctob() function can be used safely in multithreaded applications, as long as setlocale(3C) is not being called to change the locale. SunOS 5.11 14 Aug 2002 wctob(3C)

Check Out this Related Man Page

wctob(3)						     Library Functions Manual							  wctob(3)

NAME
wctob - Converts a wide character to a single byte in multibyte-character format LIBRARY
Standard C Library (libc) SYNOPSIS
#include <stdlib.h> #include <wchar.h> int wctob( wint_t wc ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: wctob(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to a variable containing a wide-character value. DESCRIPTION
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 multi- byte-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. Converting only the characters whose encoding requires one byte has limited usefulness in multibyte codesets, where codes for many or most characters require multiple bytes. RETURN VALUES
The wctob() function returns one of the following: The counterpart multibyte-character value, if wc can be converted to a multibyte-format 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 ERRORS
The wctob() function sets errno to the specified value for the following conditions: An invalid character value is encountered. RELATED INFORMATION
Functions: btowc(3), mblen(3), mbtowc(3), wctomb(3), mbstowcs(3), wcstombs(3) Files: locale(4) delim off wctob(3)
Man Page