C + + has char and wchar_t support for characters, two of which handle a 8-bit character, while the latter represents more characters.
There are two ways in which C + + handles large character sets: First, if the large character set is the implementation's basic character set, the compiler vendor can define char as a 16-bit byte or longer byte, and the implementation can support both the Small Basic character set and a larger extended character set.
A 8-bit char can represent a basic character set, and another type, wchar_t (wide character type), can represent the extended character set. The wchar_t type is an integer type that has enough space to represent the maximum extended character that the system uses. This type is the same as the length and symbol properties of another integral type (underlying).
CIN and cout treat the loser and output as a char stream and are therefore not suitable for handling wchar_t types. The iostream header file provides win and Wout, which can be used to process wchar_t. In addition, you can indicate a wide character constant and a wide string by prefixing the L.
wchar_t bob=l ' P ';
Wout<<l "Tall" <<endl;
C++11 adds two new types of support for strings: char16_t and char32_t.
With the increasing use of Unicode, type wchar_t obviously no longer satisfies the requirements. When character and string encoding is performed on a computer system, it is not sufficient to use Unicode code points only. Specifically, string encoding, if there are specific length and symbol characteristics of the type, will be helpful, and type wchar_t length and symbol characteristics with the implementation. As a result, C++11 has added type char16_t and char32_t, the former unsigned, 16 bits long, and the latter unsigned, but 32 bits long. C++11 uses the prefix u to represent char16_t character constants and string constants, and uses the prefix u to represent char32_t constants.
005--c++ characters