Next: , Previous: , Up: Output Format   [Contents][Index]


3.2 Control-Character Lines

Control-character lines are used to display characters whose code values fall outside the range of printable characters from US ASCII ( Ecma-6 / ISO 646). That is, those characters whose code values fall below below 32 decimal (those from the C0 set of control characters from Ecma-48 / ISO/IEC 6429); and those whose values are at or above 127 decimal (the “delete” character, and character byte values with the high bit set).

Control-character lines begin with an initial dot, ‘.’, followed by the control characters or high-value bytes being represented.

. BEL/^G NUL/^ CR/^M LF/^J DEL/^? xA0 xFF

Control characters (whose numeric codes fall below decimal 32, plus the delete character at decimal 127) are represented by a mnemonic acronym identifying the character’s function. Unless the -C was given, this acronym is followed by a slash, and the control-key combination that would produce the corresponding character (control characters are usually much more recognizable from one or the other of their name or their control-character representation, than they are by their hexadecimal code value). The “control-key combination” representation consists of a “hat” or “circumflex accent” character, followed by a character with a value in the range of 63 through 95 decimal.

Note that the delete character, designated as ‘DEL/^?’, is a special case, in that one can not generally reproduce that key by holding down the control key and typing a question mark; it is simply used as an identification of the key.

Other values (high-value bytes) are represented by the lowercase letter ‘x’ followed by the two-digit hexadecimal code value for the character.

For reference, here’s a table of the control characters (plus DEL). It is based on the information from Table 1 of Ecma-48 / ISO/IEC 6429 (the control-key representation has been added).

HexKeyNameHexKeyName
x00^@NULx10^PDLE
x01^ASOHx11^QDC1
x02^BSTXx12^RDC2
x03^CETXx13^SDC3
x04^DEOTx14^TDC4
x05^EENQx15^UNAK
x06^FACKx16^VSYN
x07^GBELx17^WETB
x08^HBSx18^XCAN
x09^ITABx19^YEM
x0A^JLFx1A^ZSUB
x0B^KVTx1B^[ESC
x0C^LFFx1C^\IS4
x0D^MCRx1D^]IS3
x0E^NSOx1E^^IS2
x0F^OSIx1F^_IS1
x7F^?DEL

Next: , Previous: , Up: Output Format   [Contents][Index]