article

The C0 and C1 control code sets define control codes for use in text. C0, originally defined in ISO 646, defines codes in the range 00HEX–1FHEX. C1, originally defined in ISO 6429, defines codes in the range 80HEX–9FHEX. The C0 codes are used with ASCII and most encodings based on it. The C1 codes were included in the ISO-8859-n series of encodings and Unicode but are rarely used. When they turn up in documents, Web pages, e-mail messages, etc., which are ostensibly in an ISO-8859-n encoding, they probably are actually intended to refer to the characters at that position in a proprietary, system-specific encoding such as Windows-1252 or the Apple Macintosh ("MacRoman") character set, even though such usage is nonstandard.

Most applications only interpret the control codes for LF, CR, and HT. A few applications also interpret VT, FF, and NEL (in C1). Very few applications interpret the other C0 and C1 control codes.

__TOC__

C0 (ASCII and derivatives)


SeqDecHexAbbrCharacter nameDescription/notes
^@000x00NULNullOriginally used to allow gaps to be left on paper tape for edits. Later used for padding after a code that might take a terminal some time to process (e.g. a carriage return or line feed on a printing terminal). Now often used as a string terminator, especially in C.
^A010x01SOHStart of Heading First character of a message heading.
^B020x02STXStart of Text First character of message text, and may be used to terminate the message heading.
^C030x03ETXEnd of TextOften used as a "break" character (Ctrl-C) to interrupt a program or process. In TOPS-20, it was used to gain the system's attention before logging in.
^D040x04EOTEnd of TransmissionUsed to represent the end-of-file in Unix. However, MS-DOS uses ^Z for end-of-file. On Apple II systems, it signaled that a DOS command followed.
^E050x05ENQEnquiry Signal intended to trigger a response at the receiving end, to see if it is still present
^F060x06ACKAcknowledge response to an ENQ
^G070x07BELBellOriginally used to sound a bell on the terminal. Later used for a beep on systems that didn't have a physical bell. May also quickly turn on and off inverse video (a visual bell).
^H080x08BS BackspaceDeletes the character to the left and moves the cursor left.
^I090x09HT Horizontal TabGenerally referred to as simply "tab".
^J100x0ALF Line FeedOn typewriters, printers, and some terminal emulators, moves the cursor down one row without affecting its column position. On Unix, used as to mark end-of-line. In MS-DOS, Windows, and various network standards, is used following CR as part of the end-of-line mark.
^K110x0BVT Vertical Tab
^L120x0CFF Form FeedOn printers, load the next page. Treated as whitespace by Python, and may be used to separate logical divisions in code. In some terminal emulators, it clears the screen.
^M130x0DCR Carriage ReturnOriginally used to move the cursor to column zero while staying on the same line. On Mac OS (pre-Mac OS X), as well as in earlier systems such as the Apple II and Commodore 64, used to mark end-of-line. In MS-DOS, Windows, and various network standards, it is used preceding LF as part of the end-of-line mark. The Enter or Return key on a keyboard will send this character, but it may be converted to a different end-of-line sequence by a terminal program.
^N140x0ESO Shift OutSwitch to an alternate character set.
^O150x0FSI Shift InReturn to regular character set after Shift Out. In TOPS-20, it signalled that further output should be discarded; the program would continue to run but not display or print anything until ^O is typed again.
^P160x10DLEData Link EscapeCause the following data to be interpreted as raw data, not control codes.
^Q170x11DC1Device Control 1/XONResume transmission. Used for software flow control. In some terminal programs, ends pause started with Ctrl-S.
^R180x12DC2Device Control 2In TOPS-20, reprinted the current line, tidying up any character deletions.
^S190x13DC3Device Control 3/XOFFSuspend transmission. Used for software flow control. In some terminal programs, pauses display of text.
^T200x14DC4Device Control 4In TOPS-20, it caused a brief system-status line to be displayed.
^U210x15NAKNegative Acknowledge Sent by a station as a negative response to the station with which the connection has been set up. In binary synchronous communication protocol, the NAK is used to indicate that an error was detected in the previously received block and that the receiver is ready to accept retransmission of that block. In multipoint systems, the NAK is used as the not-ready reply to a poll. In some text editors, it was used as a "Delete Line" character.
^V220x16SYNSynchronous Idle Used in synchronous transmission systems to provide a signal from which synchronous correction may be achieved between data terminal equipment, particularly when no other character is being transmitted.
^W230x17ETBEnd of Transmission Block Indicates the end of a transmission block of data when data are divided into such blocks for transmission purposes. In some text editors, it is used as a "Delete Word" character which rubs out the previous text entry back to the preceding space.
^X240x18CANCancel Indicates that the data with which it is associated are in error or are to be disregarded, or cannot be represented on a particular device.
^Y250x19EM End of MediumIn many programs, a keyboard input of Ctrl-Y is a "Redo" command to undo the last Ctrl-Z undo command.
^Z260x1ASUBSubstituteOn MS-DOS systems with files opened in text mode, "end of text" or "end of file" is marked by the Ctrl-Z character (code 26, "Substitute"), instead of ^C or ^D common on other operating systems. In many programs, a keyboard input of Ctrl-Z is an "undo" command to reverse the most recent input or action.
^[270x1BESCEscapeThe ESC key on the keyboard will cause this character to be sent on most systems. It can be used in software user interfaces to exit from a screen, menu, or mode, or in device-control protocols (e.g., printers and terminals) to signal that what follows is a special command sequence rather than normal text.
^\280x1CFS File SeparatorCan be used as delimiters to mark fields of data structures. If used for hierarchical levels, US is the lowest level (dividing plain-text data items), while RS, GS, and FS are of increasing level to divide groups made up of items of the level beneath it.
^]290x1DGS Group Separator
^^300x1ERS Record Separator
^_310x1FUS Unit Separator
1270x7FDELRubout/DeleteOriginally used to mark deleted characters on paper tape, since any character could be changed to all ones by punching holes everywhere. In modern systems, used to delete the character to the right of the cursor.

C1 (ISO-8859 and unicode)


DecHexShort Abbr
(RFC 1345)
Full AbbrCharacter nameDescription/notes
1280x80PAPADPadding Characterlisted as XXX in unicode
1290x81HOHOPHigh Octet Preset
1300x82BHBPHBreak Permitted Here
1310x83NHNBHNo Break Here
1320x84ININDIndex
1330x85NLNELNext LineUsed to mark end-of-line on some IBM mainframes.
1340x86SASSAStart of Selected Area
1350x87ESESAEnd of Selected Area
1360x88HSHTSHorizontal Tab Set
1370x89HJHTJHorizontal Tab Justified
1380x8AVSVTSVertical Tab Set
1390x8BPDPLDPartial Line Forward
1400x8CPUPLUPartial Line Backward
1410x8DRIRI Reverse Line Feed
1420x8ES2SS2Single-Shift 2
1430x8FS3SS3Single-Shift 3
1440x90DCDCSDevice Control String
1450x91P1PU1Private Use 1
1460x92P2PU2Private Use 2
1470x93TSSTSSet Transmit State
1480x94CCCCHCancel character
1490x95MWMW Message Waiting
1500x96SGSPAStart of Protected Area
1510x97EGEPAEnd of Protected Area
1520x98SSSOSStart of String
1530x99GCSGCISingle Graphic Char Introlisted as XXX in unicode
1540x9ASCSCISingle Char Intro
1550x9BCICSIControl Sequence Intro
1560x9CSIST String Terminator
1570x9DOCOSCOS Command
1580x9EPMPM Private Message
1590x9FACAPCApp Program Command

References


Control characters

SOH

 

This article is licensed under the GNU Free Documentation License. It uses material from the "C0 and C1 control codes".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld