Character sets and encodings
 Basic character set
The basic character set consists of the following 95 characters:
|U+000C||Form feed (FF)|
|U+0030 .. U+0039||Digit zero .. nine|
|U+0041 .. U+005A||Latin capital letter A .. Z|
|U+005B||Left square bracket|
|U+005D||Right square bracket|
|U+0061 .. U+007A||Latin small letter a .. z|
|U+007B||Left curly bracket|
|U+007D||Right curly bracket|
Unlike C++, the U+000A LINE FEED (LF) character is not included in basic character set. Instead, there shall be some way of indicating the end of each line of text in the source file and the document treats such an end-of-line indicator as if it were a single new-line character.
Basic character set is also known as basic source character set.
 Basic execution character set
The basic execution character set contains all the members of the basic character set, plus the following characters:
|U+000A||Line feed (LF)|
|U+000D||Carriage return (CR)|
For each basic execution character set, the values of the members shall be non-negative and distinct from one another. In both the source and execution basic character sets, the value of each character after 0 in the above list of decimal digits shall be one greater than the value of the previous. The U+0000 NULL character has the value 0.
The representation of each member of the basic execution character sets fit in a byte.
In C++, basic execution character set is also known as basic literal character set and basic execution wide-character set.
 Literal encodings
The literal encoding is an implementation-defined mapping of the characters of the execution character set to the values in a character constant or string literal without encoding prefix. It supports a mapping from all the basic execution character set values into the implementation-defined encoding. It may contain multibyte character sequences.
The following characters are not in basic execution character set, but they are required to be encoded as a single byte in an ordinary character constant or ordinary string literal.
The wide literal encoding is an implementation-defined mapping of the characters of the execution character set to the values in an
L-prefixed character constant or string literal. It supports a mapping from all the basic execution character set values into the implementation-defined encoding. If an implementation does not define
__STDC_MB_MIGHT_NEQ_WC__, the mapping produces values identical to the literal encoding for all the basic execution character set values. One or more values may map to one or more values of the extended execution character set.
The UTF-8 encoding is used for mapping characters of the execution character set to a
An implementation-defined encoding (until C23)The UTF-16 encoding (since C23) is used for mapping characters of the execution character set to a
An implementation-defined encoding (until C23)The UTF-32 encoding (since C23) is used for mapping characters of the execution character set to a
 See also
C++ documentation for Character sets and encodings