W3cubDocs

/C

Character sets

Basic source character set

The basic source character set consists of 95 characters:

  • the space character,
  • the control characters representing
    • horizontal tab,
    • vertical tab,
    • and form feed,
  • plus the following 91 graphical characters:
a b c d e f g h i j k l m n o p q r s t u v w x y z
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9
_ { } [ ] # ( ) < > % : ; . ? * + - / ^ & | ~ ! = , \ "

Unlike C++, the control character representing new line is not included in basic source 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 execution character set

The basic execution character set and the basic execution wide-character set shall each contain all the members of the basic source character set, plus control characters representing alert, backspace, and carriage return, and new line, plus a null character (respectively, null wide character), whose value is 0.

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 representation of each member of the source and execution basic character sets shall fit in a byte.

See also

ASCII chart
C++ documentation for Character sets and encodings

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/c/language/charset