ASCII(7) Linux Programmer's Manual ASCII(7)
NAME
ascii - the ASCII character set encoded in octal, decimal, and hex
DESCRIPTION
ASCII is the American Standard Code for Information Interchange. It is
a 7-bit code. Many 8-bit codes (such as ISO 8859-1, the Linux default
character set) contain ASCII as their lower half. The international
counterpart of ASCII is known as ISO 646.
The following table contains the 128 ASCII characters.
C program '\X' escapes are noted.
Oct Dec Hex Char Oct Dec Hex Char
------------------------------------------------------------------------
000 0 00 NUL '\0' 100 64 40 @
001 1 01 SOH (start of heading) 101 65 41 A
002 2 02 STX (start of text) 102 66 42 B
003 3 03 ETX (end of text) 103 67 43 C
004 4 04 EOT (end of transmission) 104 68 44 D
005 5 05 ENQ (enquiry) 105 69 45 E
006 6 06 ACK (acknowledge) 106 70 46 F
007 7 07 BEL '\a' (bell) 107 71 47 G
010 8 08 BS '\b' (backspace) 110 72 48 H
011 9 09 HT '\t' (horizontal tab) 111 73 49 I
012 10 0A LF '\n' (new line) 112 74 4A J
013 11 0B VT '\v' (vertical tab) 113 75 4B K
014 12 0C FF '\f' (form feed) 114 76 4C L
015 13 0D CR '\r' (carriage ret) 115 77 4D M
016 14 0E SO (shift out) 116 78 4E N
017 15 0F SI (shift in) 117 79 4F O
020 16 10 DLE (data link escape) 120 80 50 P
021 17 11 DC1 (device control 1) 121 81 51 Q
022 18 12 DC2 (device control 2) 122 82 52 R
023 19 13 DC3 (device control 3) 123 83 53 S
024 20 14 DC4 (device control 4) 124 84 54 T
025 21 15 NAK (negative ack.) 125 85 55 U
026 22 16 SYN (synchronous idle) 126 86 56 V
027 23 17 ETB (end of trans. blk) 127 87 57 W
030 24 18 CAN (cancel) 130 88 58 X
031 25 19 EM (end of medium) 131 89 59 Y
032 26 1A SUB (substitute) 132 90 5A Z
033 27 1B ESC (escape) 133 91 5B [
034 28 1C FS (file separator) 134 92 5C \ '\\'
035 29 1D GS (group separator) 135 93 5D ]
036 30 1E RS (record separator) 136 94 5E ^
037 31 1F US (unit separator) 137 95 5F _
040 32 20 SPACE 140 96 60 `
041 33 21 ! 141 97 61 a
042 34 22 " 142 98 62 b
043 35 23 # 143 99 63 c
044 36 24 $ 144 100 64 d
045 37 25 % 145 101 65 e
046 38 26 & 146 102 66 f
047 39 27 ? 147 103 67 g
050 40 28 ( 150 104 68 h
051 41 29 ) 151 105 69 i
052 42 2A * 152 106 6A j
053 43 2B + 153 107 6B k
054 44 2C , 154 108 6C l
055 45 2D - 155 109 6D m
056 46 2E . 156 110 6E n
057 47 2F / 157 111 6F o
060 48 30 0 160 112 70 p
061 49 31 1 161 113 71 q
062 50 32 2 162 114 72 r
063 51 33 3 163 115 73 s
064 52 34 4 164 116 74 t
065 53 35 5 165 117 75 u
066 54 36 6 166 118 76 v
067 55 37 7 167 119 77 w
070 56 38 8 170 120 78 x
071 57 39 9 171 121 79 y
072 58 3A : 172 122 7A z
073 59 3B ; 173 123 7B {
074 60 3C < 174 124 7C |
075 61 3D = 175 125 7D }
076 62 3E > 176 126 7E ~
077 63 3F ? 177 127 7F DEL
Here's the full 256 byte character set (ISO-8859, CP-47):
Oct Dec Hex Char Oct Dec Hex Char
000 000 00 ? 200 128 80 Ç
001 001 01 ☺ 201 129 81 ü
002 002 02 ☻ 202 130 82 é
003 003 03 ♥ 203 131 83 â
004 004 04 ♦ 204 132 84 ä
005 005 05 ♣ 205 133 85 à
006 006 06 ♠ 206 134 86 å
007 007 07 <BELL> 207 135 87 ç
010 008 08 <BACKSPACE> 210 136 88 ê
011 009 09 <TAB> 211 137 89 ë
012 010 0a <LF> 212 138 8a è
013 011 0b <VTAB> 213 139 8b ï
014 012 0c <FF> 214 140 8c î
015 013 0d <CR> 215 141 8d ì
016 014 0e ♫ 216 142 8e Ä
017 015 0f ☼ 217 143 8f Å
020 016 10 ► 220 144 90 É
021 017 11 ◄ 221 145 91 æ
022 018 12 ↕ 222 146 92 Æ
023 019 13 ‼ 223 147 93 ô
024 020 14 ¶ 224 148 94 ö
025 021 15 § 225 149 95 ò
026 022 16 ▬ 226 150 96 û
027 023 17 ↨ 227 151 97 ù
030 024 18 ↑ 230 152 98 ÿ
031 025 19 ↓ 231 153 99 Ö
032 026 1a <EOF> 232 154 9a Ü
033 027 1b <ESC> 233 155 9b ¢
034 028 1c ∟ 234 156 9c £
035 029 1d ↔ 235 157 9d ¥
036 030 1e ▲ 236 158 9e ₧
037 031 1f ▼ 237 159 9f ƒ
040 032 20 240 160 a0 á
041 033 21 ! 241 161 a1 í
042 034 22 " 242 162 a2 ó
043 035 23 # 243 163 a3 ú
044 036 24 $ 244 164 a4 ñ
045 037 25 % 245 165 a5 Ñ
046 038 26 & 246 166 a6 ª
047 039 27 ' 247 167 a7 º
050 040 28 ( 250 168 a8 ¿
051 041 29 ) 251 169 a9 ⌐
052 042 2a * 252 170 aa ¬
053 043 2b + 253 171 ab ½
054 044 2c , 254 172 ac ¼
055 045 2d - 255 173 ad ¡
056 046 2e . 256 174 ae «
057 047 2f / 257 175 af »
060 048 30 0 260 176 b0 ░
061 049 31 1 261 177 b1 ▒
062 050 32 2 262 178 b2 ▓
063 051 33 3 263 179 b3 │
064 052 34 4 264 180 b4 ┤
065 053 35 5 265 181 b5 ╡
066 054 36 6 266 182 b6 ╢
067 055 37 7 267 183 b7 ╖
070 056 38 8 270 184 b8 ╕
071 057 39 9 271 185 b9 ╣
072 058 3a : 272 186 ba ║
073 059 3b ; 273 187 bb ╗
074 060 3c < 274 188 bc ╝
075 061 3d = 275 189 bd ╜
076 062 3e > 276 190 be ╛
077 063 3f ? 277 191 bf ┐
100 064 40 @ 300 192 c0 └
101 065 41 A 301 193 c1 ┴
102 066 42 B 302 194 c2 ┬
103 067 43 C 303 195 c3 ├
104 068 44 D 304 196 c4 ─
105 069 45 E 305 197 c5 ┼
106 070 46 F 306 198 c6 ╞
107 071 47 G 307 199 c7 ╟
110 072 48 H 310 200 c8 ╚
111 073 49 I 311 201 c9 ╔
112 074 4a J 312 202 ca ╩
113 075 4b K 313 203 cb ╦
114 076 4c L 314 204 cc ╠
115 077 4d M 315 205 cd ═
116 078 4e N 316 206 ce ╬
117 079 4f O 317 207 cf ╧
120 080 50 P 320 208 d0 ╨
121 081 51 Q 321 209 d1 ╤
122 082 52 R 322 210 d2 ╥
123 083 53 S 323 211 d3 ╙
124 084 54 T 324 212 d4 ╘
125 085 55 U 325 213 d5 ╒
126 086 56 V 326 214 d6 ╓
127 087 57 W 327 215 d7 ╫
130 088 58 X 330 216 d8 ╪
131 089 59 Y 331 217 d9 ┘
132 090 5a Z 332 218 da ┌
133 091 5b [ 333 219 db █
134 092 5c \ 334 220 dc ▄
135 093 5d ] 335 221 dd ▌
136 094 5e ^ 336 222 de ▐
137 095 5f _ 337 223 df ▀
140 096 60 ` 340 224 e0 α
141 097 61 a 341 225 e1 ß
142 098 62 b 342 226 e2 Γ
143 099 63 c 343 227 e3 π
144 100 64 d 344 228 e4 Σ
145 101 65 e 345 229 e5 σ
146 102 66 f 346 230 e6 µ
147 103 67 g 347 231 e7 τ
150 104 68 h 350 232 e8 Φ
151 105 69 i 351 233 e9 Θ
152 106 6a j 352 234 ea Ω
153 107 6b k 353 235 eb δ
154 108 6c l 354 236 ec ∞
155 109 6d m 355 237 ed φ
156 110 6e n 356 238 ee ε
157 111 6f o 357 239 ef ∩
160 112 70 p 360 240 f0 ≡
161 113 71 q 361 241 f1 ±
162 114 72 r 362 242 f2 ≥
163 115 73 s 363 243 f3 ≤
164 116 74 t 364 244 f4 ⌠
165 117 75 u 365 245 f5 ⌡
166 118 76 v 366 246 f6 ÷
167 119 77 w 367 247 f7 ≈
170 120 78 x 370 248 f8 °
171 121 79 y 371 249 f9 ∙
172 122 7a z 372 250 fa ·
173 123 7b { 373 251 fb √
174 124 7c | 374 252 fc ⁿ
175 125 7d } 375 253 fd ²
176 126 7e ~ 376 254 fe ■
177 127 7f ⌂ 377 255 ff
Tables
For convenience, let us give more compact tables in hex and decimal.
2 3 4 5 6 7 30 40 50 60 70 80 90 100 110 120
------------- ---------------------------------
0: 0 @ P ` p 0: ( 2 < F P Z d n x
1: ! 1 A Q a q 1: ) 3 = G Q [ e o y
2: " 2 B R b r 2: * 4 > H R \ f p z
3: # 3 C S c s 3: ! + 5 ? I S ] g q {
4: $ 4 D T d t 4: " , 6 @ J T ^ h r |
5: % 5 E U e u 5: # - 7 A K U _ i s }
6: & 6 F V f v 6: $ . 8 B L V ` j t ~
7: ? 7 G W g w 7: % / 9 C M W a k u DEL
8: ( 8 H X h x 8: & 0 : D N X b l v
9: ) 9 I Y i y 9: ? 1 ; E O Y c m w
A: * : J Z j z
B: + ; K [ k {
C: , < L \ l |
D: - = M ] m }
E: . > N ^ n ~
F: / ? O _ o DEL
NOTES
History
An ascii manual page appeared in Version 7 of AT&T UNIX.
On older terminals, the underscore code is displayed as a left arrow,
called backarrow, the caret is displayed as an up-arrow and the verti-
cal bar has a hole in the middle.
Uppercase and lowercase characters differ by just one bit and the ASCII
character 2 differs from the double quote by just one bit, too. That
made it much easier to encode characters mechanically or with a non-
microcontroller-based electronic keyboard and that pairing was found on
old teletypes.
The ASCII standard was published by the United States of America Stan-
dards Institute (USASI) in 1968.
SEE ALSO
iso_8859-1(7), iso_8859-10(7), iso_8859-13(7), iso_8859-14(7),
iso_8859-15(7), iso_8859-16(7), iso_8859-2(7), iso_8859-3(7),
iso_8859-4(7), iso_8859-5(7), iso_8859-6(7), iso_8859-7(7),
iso_8859-8(7), iso_8859-9(7)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2009-02-12 ASCII(7)