The following pages on cppreference.com seem jointly inconsistent:
- https://en.cppreference.com/w/c/language/charset
Basic character set is also known as basic source character set.
The basic execution character set contains all the members of the basic character set, plus the following characters:
U+0000 Null
U+0007 Bell
U+0008 Backspace
U+000A Line feed (LF)
U+000D Carriage return (CR)
- https://en.cppreference.com/w/c/language/memory_model
A byte is the smallest addressable unit of memory. It is defined as a contiguous sequence of bits, large enough to hold any member of the basic execution character set (the 96 characters that are required to be single-byte). C supports bytes of sizes 8 bits and greater.
- https://en.cppreference.com/w/c/language/translation_phases
The source character set is a multibyte character set which includes the basic source character set as a single-byte subset, consisting of the following 96 characters: …
… as long as all 96 characters from the basic source character set listed in phase 1 have single-byte representations
It’s not logically possible for both basic execution character set (BECS) and basic source character set (BSCS) to have 96 characters and for BECS to contain all members of BSCS plus 5 control characters.
The latest C23 draft is here: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf
The latest draft of C17 is here: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2310.pdf
The most relevant passages can be located by ctrl+f for the string “Both the basic source and basic execution character sets” in these pdf files.
I get the impression from reading these that the BECS is a proper superset of BSCS, just as stated on cppreference’s charset page. But I hesitate to conclude, as I seem forced to do, that cppreference (which I find normally very reliable) is wrong both on the memory model page and on the translation phase page. So, what’s going on?