Next: Escape-Sequence Lines, Previous: Text Lines, Up: Output Format [Contents][Index]
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).
Hex | Key | Name | Hex | Key | Name |
---|---|---|---|---|---|
x00 | ^@ | NUL | x10 | ^P | DLE |
x01 | ^A | SOH | x11 | ^Q | DC1 |
x02 | ^B | STX | x12 | ^R | DC2 |
x03 | ^C | ETX | x13 | ^S | DC3 |
x04 | ^D | EOT | x14 | ^T | DC4 |
x05 | ^E | ENQ | x15 | ^U | NAK |
x06 | ^F | ACK | x16 | ^V | SYN |
x07 | ^G | BEL | x17 | ^W | ETB |
x08 | ^H | BS | x18 | ^X | CAN |
x09 | ^I | TAB | x19 | ^Y | EM |
x0A | ^J | LF | x1A | ^Z | SUB |
x0B | ^K | VT | x1B | ^[ | ESC |
x0C | ^L | FF | x1C | ^\ | IS4 |
x0D | ^M | CR | x1D | ^] | IS3 |
x0E | ^N | SO | x1E | ^^ | IS2 |
x0F | ^O | SI | x1F | ^_ | IS1 |
x7F | ^? | DEL |
Next: Escape-Sequence Lines, Previous: Text Lines, Up: Output Format [Contents][Index]