A Table of Tables (Escaping Literality)
It is oft helpful to have a LIST of certain codes like UNICODES, ESCape sequences, etc. (see TOC)
Python Lexical Analysis (here):
TOC:
1: Escape codes
2: Print ESC codes
3: ANSI codes
4: UNICODE
(1) A Table of Escape Sequences (here):
Escape Sequence | Meaning | Notes |
---|---|---|
| Backslash and newline ignored | (1) |
| Backslash ( | |
| Single quote ( | |
| Double quote ( | |
| ASCII Bell (BEL) | |
| ASCII Backspace (BS) | |
| ASCII Formfeed (FF) | |
| ASCII Linefeed (LF) | |
| ASCII Carriage Return (CR) | |
| ASCII Horizontal Tab (TAB) | |
| ASCII Vertical Tab (VT) | |
| Character with octal value ooo | (2,4) |
| Character with hex value hh | (3,4) |
(2.1) Google search for "Table of Python escape sequences" (here)
(3) GitHub -- ANSI escape codes (here)
Name | decimal | octal | hex | C-escape | Ctrl-Key | Description |
---|---|---|---|---|---|---|
BEL | 7 | 007 | 0x07 | \a | ^G | Terminal bell |
BS | 8 | 010 | 0x08 | \b | ^H | Backspace |
HT | 9 | 011 | 0x09 | \t | ^I | Horizontal TAB |
LF | 10 | 012 | 0x0A | \n | ^J | Linefeed (newline) |
VT | 11 | 013 | 0x0B | \v | ^K | Vertical TAB |
FF | 12 | 014 | 0x0C | \f | ^L | Formfeed (also: New page NP ) |
CR | 13 | 015 | 0x0D | \r | ^M | Carriage return |
ESC | 27 | 033 | 0x1B | \e * | ^[ | Escape character |
DEL | 127 | 177 | 0x7F | <none> | <none> | Delete character |
ANSI Escape Sequences
Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
Cursor Controls
ESC Code Sequence | Description |
---|---|
ESC[H | moves cursor to home position (0, 0) |
ESC[{line};{column}H ESC[{line};{column}f | moves cursor to line #, column # |
ESC[#A | moves cursor up # lines |
ESC[#B | moves cursor down # lines |
ESC[#C | moves cursor right # columns |
ESC[#D | moves cursor left # columns |
ESC[#E | moves cursor to beginning of next line, # lines down |
ESC[#F | moves cursor to beginning of previous line, # lines up |
ESC[#G | moves cursor to column # |
ESC[6n | request cursor position (reports as ESC[#;#R ) |
ESC M | moves cursor one line up, scrolling if needed |
ESC 7 | save cursor position (DEC) |
ESC 8 | restores the cursor to the last saved position (DEC) |
ESC[s | save cursor position (SCO) |
ESC[u | restores the cursor to the last saved position (SCO) |
UNICODE (here)
SYMBL (here)
- 0000
- 0001
- 0002
- 0003
- 0004
- 0005
- 0006
- 0007
- 0008
- 0009
- 000A
- 000B
- 000C
- 000D
- 000E
- 000F
- 0010
- 0011
- 0012
- 0013
- 0014
- 0015
- 0016
- 0017
- 0018
- 0019
- 001A
- 001B
- 001C
- 001D
- 001E
- 001F
- 0020
- 0021
- 0022
- 0023
- 0024
- 0025
- 0026
- 0027
- 0028
- 0029
- 002A
- 002B
- 002C
- 002D
- 002E
- 002F
- 0030
- 0031
- 0032
- 0033
- 0034
- 0035
- 0036
- 0037
- 0038
- 0039
- 003A
- 003B
- 003C
- 003D
- 003E
- 003F
- 0040
- 0041
- 0042
- 0043
- 0044
- 0045
- 0046
- 0047
- 0048
- 0049
- 004A
- 004B
- 004C
- 004D
- 004E
- 004F
- 0050
- 0051
- 0052
- 0053
- 0054
- 0055
- 0056
- 0057
- 0058
- 0059
- 005A
- 005B
- 005C
- 005D
- 005E
- 005F
- 0060
- 0061
- 0062
- 0063
- 0064
- 0065
- 0066
- 0067
- 0068
- 0069
- 006A
- 006B
- 006C
- 006D
- 006E
- 006F
- 0070
- 0071
- 0072
- 0073
- 0074
- 0075
- 0076
- 0077
- 0078
- 0079
- 007A
- 007B
- 007C
- 007D
- 007E
- 007F
- 0080
- 0081
- 0082
- 0083
- 0084
- 0085
- 0086
- 0087
- 0088
- 0089
- 008A
- 008B
- 008C
- 008D
- 008E
- 008F
- 0090
- 0091
- 0092
- 0093
- 0094
- 0095
- 0096
- 0097
- 0098
- 0099
- 009A
- 009B
- 009C
- 009D
- 009E
- 009F
- 00A0
- 00A1
Complete Unicode Character Table on One Page
(
Comments
Post a Comment