btowc() — Convert single-byte character to wide-character
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
ISO C |
both | z/OS V1R2 |
Format
#include <wchar.h>
wint_t btowc(int c);
General description
The btowc() function determines whether c constitutes a valid (one-byte) character in the initial shift state.
The behavior of this wide-character function is affected by the LC_CTYPE category of the current locale. If you change the category, undefined results can occur.
Returned value
If successful, btowc() returns the wide-character representation of the character c.
If c has the value EOF or if (unsigned char)c does not constitute a valid (one-byte) character in the initial shift state, btowc() returns WEOF.
There are no documented errno values.
Related information
- “Internationalization: Locales and Character Sets” in z/OS XL C/C++ Programming Guide
- locale.h
- wchar.h
- mbtowc() — Convert multibyte character to wide character
- setlocale() — Set locale
- wctob() — Convert wide character to byte