Character Sets


The ISO-C standard recognizes two distinct character sets:

Each set is further divided into a basic character set and a set of zero or more locale-specific members (which are not members of the basic character set) called extended characters. The combined set is also called the extended character set. The values of the members of the execution character set are implementation-defined.

In a character constant or string literal, members of the execution character set are represented by corresponding members of the source character set or by escape sequences consisting of the backslash \ followed by one or more characters.

The basic character set

   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
   ! “ # % & ‘ ( ) * + , - . / :
   ; < = > ? [ \ ] ^ _ { | } ~

     Also required are the following control characters:

       space
       horizontal tab
       vertical tab
       form feed

The basic source character set is required to include an indicator (one or more physical characters) representing

       end-of-line

Any other characters encountered in a source file result in undefined behaviour unless part of:

The basic execution character set is required to include control characters representing:

       alert
       backspace
       carriage return
       new line

A byte with all bits set to 0, the null character, is used to terminate a character string.

Index