wconv(3C)
NAME
towupper(), towlower() − translate wide characters
SYNOPSIS
#include <wchar.h>
wint_t towupper(wint_t wc);
wint_t towlower(wint_t wc);
Remarks:
These functions are compliant with the XPG4 Worldwide Portability Interface wide-character conversion functions. They parallel the 8-bit character conversion functions defined in conv(3C).
DESCRIPTION
towupper() and towlower() have as domain a wint_t, the value of which is representable as a wchar_t or the value WEOF. If the argument has any other value, the behavior is undefined. If the argument of towupper() represents a lowercase letter, the result is the corresponding uppercase letter. If the argument of towlower() represents an uppercase letter, the result is the corresponding lowercase letter. All other arguments are returned unchanged.
Definitions for these functions, the types wint_t, wchar_t, and the value WEOF are provided in the <wchar.h> header.
EXTERNAL INFLUENCES
Locale
The LC_CTYPE category determines the translations to be done.
International Code Set Support
Single-byte character code sets are supported. Japanese HP15 and EUC multi-byte character code sets are supported. towupper() and towlower() return their argument for values in other multi-byte character code sets outside the ASCII range.
WARNING
towupper() and towlower() are supplied both as library functions and as macros defined in the <wchar.h> header. Normally, the macro versions are used. To obtain the library function, either use a #undef to remove the macro definition or, if compiling in ANSI C mode, enclose the function name in parenthesis or take its address. The following examples use the library function for towlower():
#include <wchar.h>
#undef towlower
...
main()
{
...
c1 = towlower(c);
...
}
or
#include <wchar.h>
...
main()
{
wint_t (*conv_func)();
...
c1 = (towlower)(c);
...
conv_func = towlower;
...
}
AUTHOR
wconv() was developed by AT&T and HP.
SEE ALSO
conv(3C), multibyte(3C), wctype(3C), setlocale(3C), lang(5).
STANDARDS CONFORMANCE
towlower(): XPG4
towupper(): XPG4
Hewlett-Packard Company — HP-UX Release 9.0: August 1992