Skip to content
Related Articles

Related Articles

Control Characters
  • Difficulty Level : Easy
  • Last Updated : 09 Aug, 2020

Control characters are characters that don’t represent printable character yet rather serves to start particular action. Control characters are utilized to execute any action, in contrast, to print printable character on display. They are also utilized as in-band signaling to cause impacts other than expansion of symbol to content.

On the other hand, Printable characters are utilized to show character on screen like Letters, symbols, numbers, and alphanumeric characters. There are different sorts of control characters, including printing control characters, data structuring control characters, and transmission control characters. A large number of such characters are frequently utilized in prefix or suffix sections of barcode and RFID scanners.

A type of control characters were presented in 1870 Baudot code: NUL and DEL. 1901 Murray code included carriage return (CR) and line feed (LF), and different variants of Baudot code included other control characters. The bell character (BEL), which rang bell to signal executives, was likewise early teletype control character.

Control characters are separated into three parts 0:

  1. ASCII control characters –
    ASCII control character comprises code 0–31 (hex 00–1F). This range is likewise called C0 set. There are two extra controls at 32 and 127 (hex 20 and 7F). ASCII table numbers 0–31 are designated for control characters used to command some peripheral devices, for example, printers. For instance, 12 denotes form feed/new page function. This command instructs printer to go to head of following page.



    This collection of control characters covers numerous applications. There are “Format Effectors” that regulate presentation of plain content. There are “Transmission Controls” for transmission protocols and “Device Controls” to begin, run and stop auxiliary devices.

    There are “Information Separators” that control different bits of information. Additional controls exist for creating cautions, showing end of file/text/code/script, and for handling errors.

    ASCII control characters include wide variety of purposes, such as text layout, communication, and device control, and that’s only tip of iceberg.

  2. C1 control characters –
    C1 covers 128-159 (hex 80-9F). C1 is essentially for displays and printers. This set is identified with ANSI escape sequences and VT100.

    C1 set was introduced in late 1970s. It is fundamentally intended for controlling monitors and printer gadgets, despite fact that portion of controls delegates different uses also. C1 set is meant for use with C0 set.

    C1 set incorporates “Format effectors” that control horizontal and vertical shift when printing. There are “Presentation controls” for characterizing line breaks or new line. There are “Area definition” controls for structure and form filling.

  3. ISO 8859 unique characters –
    ISO 8859 is collection of 8-bit character sets. The sets include different Latin, Cyrillic, Greek, Arabic, Hebrew, and Thai characters. ISO 8859 is identified with Windows character sets (“ANSI codepages”), yet these are really unique in relation to one another.

    ISO 8859 has two important characters: Non-Breaking, (NBSP) and Soft Hyphen (SHY). Two of them have control character like attributes, despite fact that they are not really termed control characters in ISO 8859.

Here are some of basic Control Codes :



Caret NotationHex CodeAbbreviationNameDescription
^@00NULLNullUsed to perform media-fill and allow gaps. Also used for padding after any code and to mark end of string, notably in programming language C/C++.
^A01STXStart of HeaderUsed as first character of head of data broadcast/message. It is usually used as field separator in Apache Hadoop.
^B02SOTStart of TextHeads text and used to mark end of heading.
^C03ETXEnd of Text

Marks end of text. In keyboard input, it is frequently used as Break character to interrupt process.

Notably seen in Unix based command lines, nano editor, etc. as (^C) to break command.

^D04EOTEnd of Transmission

Used to mark end of transmission of one or more texts(may involve header, broadcast text, and post-text).

It is also used to mark end-of-file(EOF) on terminal in UNIX based OS.

^E05ENQEnquiryRequests for reply from remote terminal, response may include transmitter identification and/or transmitter status.
^F06ACKAcknowledgeThis character is sent by receiver as approving response to sender. (Response to ENQ)
^G07ACKBellA control character to call for attention. It may control alarm or attention devices. Initially, it was used to play bell sound on terminal.
^H08BSBackSpaceShifts cursor one character position behind. While in input mode this might delete character to left of cursor. When in output mode, character once written could not be deleted(Primitively).
^I09HTHorizontal TabulationShifts cursor to next determined character position on the same line.
^J0ALFLine FeedShifts cursor to equivalent character position of next line. It is used to mark end-of-line(EOF) in UNIX. In DOS/Windows LF is used after CR(Carriage Return) to mark end-of-line.
^K0BVTVertical TabulationShifts cursor at next line.
^L0CFFForm Feed

It commands printer to discard current page and to proceed to print at the next one.

More so, it also acts as whitespace in various programming languages,

^M0DCRCarriage ReturnPrimitively used to move cursor to very first column while staying on the same line/row. In DOS, /Windows, it is used before LF to mark end-of-line(EOF). Enter/Return key corresponds to this character.
^N0ESOShift OutSwitches to substitute character set.
^O0FSIShift InReverts to general character set after Shift Out.
^P10DLEData Link EscapeIt is used particularly to deliver additional data transmission control functions. Only graphic characters and transmission control characters can be used in DLE sequences.
^Q11DC1Device Control 1 (XON)A device control character, basically dedicated to turning on or starting essential device. It might also be used to restore any device to basic mode of operation.
^R12DC2Device Control 2A device control character which is basically dedicated to turning on or starting essential device. It might also be used to set any device to special mode of operation
^S13DC3Device Control 3 (XOFF)A device control character which is basically dedicated to turning off or stopping an essential device. Also acts as secondary step stop(e.g: wait, pause, stand-by or halt)
^T14DC4Device Control 4A device control character, basically dedicated to turning off al device. It might also be used for any device control purpose not granted by other DCs.
^U15NAKNegative acknowledgeA control character sent by receiver as negative acknowledgment/response to transmitter. NAK also indicates that an error was identified in last received block.
^V16SYNSynchronous IdleUsed by synchronous transmission network to provide signal from which synchronous rectification may be achieved between data terminal equipment
^W17ETBEnd of Transmission Blockmarks end of transmission segment of data (where data is divided into such segments for transmission)
^X18CANCancelIndicates that data preceding it is in error. Hence, data is to be ignored.
^Y19EMEnd of MediumA control character that can be used to find physical end of medium or end of wanted portion of data.
^Z1ASUBSubstituteUsed as an alternative for character that has been detected to be invalid or in error. On Unix, ^Z is keyboard signal to suspend process. In DOS/Windows, it is used to mark end of file, in cmd terminal, text files and many scripts.
^[1BESCEscapeEsc key corresponds to this control character on almost every operating system. Used in many interface to escape from screen, menu, or process.,
^\1CFSFile SeparatorUsed to separate data logically, its specific purpose has to be defined for each application. When used in hierarchical order, it delimits data item called file.
^]1DGSGroup SeparatorUsed to separate data logically; its specific purpose has to be defined for each application. When used in hierarchical order, it delimits data item called group.
^^1ERSRecord SeparatorUsed to separate data logically; its specific purpose has to be defined for each application. When used in hierarchical order, it delimits data item called record.
^_1FUSUnit SeparatorUsed to separate data logically; its specific purpose has to be defined for each application. When used in hierarchical order, it delimits data item called unit.
20SPSpaceSpace is graphic character. Shifts cursor to move by one character position.
^?7FDELDeleteThe delete control character is last character in ASCII repertoire. It was designed to erase incorrect characters.

My Personal Notes arrow_drop_up
Recommended Articles
Page :