Character Symbols

CharacterStringLiteral =
     "'" { CharacterLiteral } "'".

CharacterLiteral =
     NonSpecialCharacterLiteral | SpecialCharacterLiteral |
     HexadecimalCharacterLiteral.
NonSpecialCharacterLiteral =
     any ASCII character except apostrophe ('),
     double quote ("), back slash (\), and new line.
SpecialCharacterLiteral =
     "\n" | "\t" | "\v" | "\b" | "\r" | "\f" |
     "\\" | "\'" | '\"' .
HexadecimalCharacterLiteral = .
     "\x" HexadecimalDigit HexadecimalDigit.
Digit =
     "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |
     "8" | "9".
HexadecimalDigit =
      Digit |
      "A" | "B" | "C" | "D" | "E" | "F" |
      "a" | "b" | "c" | "d" | "e" | "f".
Each character symbol corresponds to a character, and is represented by a character literal enclosed in apostrophes. For instance:
        'A' 'a' '7' '$'
Ordinarily, a character is represented by itself, except the following characters:
     New line (line feed)          HL (LF)   '\n'
     Horizontal tabulation         HT        '\t'
     Backspace                     BS        '\b'
     Carriage return               CR        '\r'
     Form feed                     FF        '\f'
     Back slash                    \         '\\'
     Apostrophe                    '         '\''
     Double quote                  "         '\"'
A character literal representing a character symbol or appearing in a word symbol can be written as
    \xZZ
where ZZ are two hexadecimal digits, corresponding to the one-byte code of the character.

For example, \x2A и \x2a are equivalent to *.

A sequence of several character symbols may be written as a single string consisting of character literals and enclosed in apostrophes. For instance:
    'ABC'
    '123'
    '\"I don\'t like swimming!\" - said a little girl.'
Thus, the sequence of three character symbols 'A', 'B', and 'C' may be written in any of the following ways:
    'A' 'B' 'C'
    'A''B''C'
    'ABC'
Related concepts
Static and Dynamic Symbols