Many Unicode characters are used to control the interpretation or display of text, but these characters themselves have no visual or spatial representation. For example, the null character ( NULL) is used in C-programming application environments to indicate the end of a string of characters. In this way, these programs only require a single starting memory address for a string (as opposed to a starting address and a length), since the string ends once the program reads the null character.

In the narrowest sense, a control code is a character with the general category , which comprises the C0 and C1 control codes, a concept defined in ISO/IEC 2022 and inherited by Unicode, with the most common set being defined in ISO/IEC 6429. Control codes are handled distinctly from ordinary Unicode characters, for example, by not being assigned character names (although they are assigned normative formal aliases). In a broader sense, other non-printing format characters, such as those used in bidirectional text, are also referred to as control characters by software; these are mostly assigned to the general category (format), used for format effectors introduced and defined by Unicode itself.

Unicode control characters

Category "Cc" control codes (C0 and C1)

Unicode control characters

The control code ranges 0x00–0x1F ("C0") and 0x7F originate from the 1967 edition of US-ASCII. The standard ISO/IEC 2022 (ECMA-35) defines extension methods for ASCII, including a secondary "C1" range of 8-bit control codes from 0x80 to 0x9F, equivalent to 7-bit sequences of with the bytes 0x40 through 0x5F. Collectively, codes in these ranges are known as the C0 and C1 control codes. Although ISO/IEC 2022 allows for the existence of multiple control code sets specifying differing interpretations of these control codes, their most common interpretation is specified in ISO/IEC 6429 (ECMA-48).

Unicode control characters

The ISO/IEC 8859 series of encodings conforms to ISO/IEC 4873 (ECMA-43) level 1, a subset of ISO/IEC 2022 designed for 8-bit character encodings, and therefore reserves the range 0x80–0x9F for use as non-printing codes by C1 control code sets such as ISO/IEC 6429. Unicode inherits its first and second blocks (comprising U+0000 through U+00FF) from ASCII and ISO/IEC 8859-1, thus incorporating the C0 and C1 control code ranges (U+0000–U+001F, U+007F–U+009F) as general category "Cc". It does not assign normative names to these control codes, though it does assign them normative aliases.

Category "Cc" control codes can serve a variety of purposes, not limited to format effectors: for example, the default ASCII C0 set includes six format effectors (, , , , and ), ten transmission controls, four device controls, four information separators and eight other control codes. Most of these characters play no explicit role in Unicode text handling, and are used only by higher-level protocols such as those used by terminal emulators. Certain characters are commonly used for formatting or sentinel purposes: (used in null-terminated strings) (inserted by the tab key) (used as a line break) (denotes a page break in a plain text file) (used in some line-breaking conventions) (sometimes used as a line break in text transcoded from EBCDIC) Unicode only specifies semantics for , , and (the ASCII format effectors except for , plus the ASCII information separators and the C1 ). The rest of the "Cc" control codes are transparent to Unicode and their meanings are left to higher-level protocols, although interpretation as defined in ISO/IEC 6429 is suggested as a default. Furthermore, certain specialised higher-level protocols, such as transcoded Teletext, may include a different interpretation of the entire C0 control code range.

Unicode introduced separators

In an attempt to simplify the several newline characters used in legacy text, Unicode introduces its own newline characters to separate either lines or paragraphs: (abbreviated LS or LSEP) and (abbreviated PS or PSEP).

Like CR and LF, LS and PS are effectors for text formatting; unlike CR and LF, they are not treated as "control codes" for ECMA-35/ECMA-48 purposes (category ), rather having semantics defined entirely by Unicode itself. They are assigned to sui generis Unicode categories and respectively, under the major category (separator) used for certain whitespace characters.

Language tags

Unicode previously included 128 characters, now deprecated, for language tags. These characters essentially mirrored the 128 ASCII characters but were used to identify the subsequent text as belonging to a particular language according to BCP 47. For example, to indicate subsequent text as the variant of English as written in the United States, the sequence , , , , and would have been used.