header

<cuchar> (uchar.h)

Unicode characters
This header provides support for 16-bit and 32-bit characters, suitable to be encoded using UTF-16 and UTF-32.

Types

In C, this header defines two macros: char16_t and char32_t, which map to unsigned integral types of the appropriate size (the same as uint_least16_t and uint_least32_t, respectively).

In C++, char16_t and char32_t are fundamental types (and thus this header does not define such macros in C++).

Macros

In C++, the following macros are defined by this header:
Macrodescription
__STD_UTF_16__If defined, values of type char16_t have UTF-16 encoding.
Otherwise, the encoding of char16_t is unspecified.
(In C11, the macro expands to 1 when defined)
__STD_UTF_32__If defined, values of type char32_t have UTF-32 encoding.
Otherwise, the encoding of char32_t is unspecified.
(In C11, the macro expands to 1 when defined)

Functions


Compatibility

This header, first introduced in C by a Technical Report extending C99, is fully supported by the latest standards of C and C++ (both published in 2011).