ASCII 控制字符

美国标准资讯交换标准码 ASCII 码中特殊的符号,电脑称为控制字符 Control Characters 并不代表任何可见的字符,而是用来控制电脑输出设备的行为。ASCII 用于电脑和通讯设备的编码系统,它将每个英文字母、数字和标点符号等符号,对应个七位元的 Binary Digit 二进位数字介于 0127 的十进位数字。例如大写字母 AASCII 码是 65,小写字母 aASCII 码是 97,数字 0ASCII 码是 48 等等。ASCIIAmerican Standard Code for Information Interchange 的缩写。ASCII 编码是美国标准资讯交换标准码,计算机资讯传输的一种编码方式。


ASCII 定义了 256 个代码 (0~255)

Dec 对照 Decimal 十进位 0~31 控制字符 ASCII Control Characters

Dec 对照 Decimal 十进位 32~127 可列印字符 ASCII Printable Characters

Dec 对照 Decimal 十进位 0~127 标准的 ASCII 编码, 128~255 为扩展的 ASCII 编码


较常用控制字符、十进位 0~31

CharOctDecHexCtrl-Key控制动作
NUL000^@空字元 Null character
SOH111^A标题开始 Start of heading
STX222^B本文开始 Start of text
ETX333^C本文结束 End of text
EOT444^D传输结束 End of Submission, 不同于 ETB
ENQ555^E请求查询 Enquiry, 与 ACK 一起使用
ACK666^F确认回应 Acknowledge, 清除 ENQ 请求查询
BEL777^G铃声 Bell, Rings Bell...
BS1088^H退格 Backspace, Delete 删除字元键
HT1199^I水平定位符号 Tab 空格键 Horizontal tab
LF1210a^J换行键 Line Feed CHR(10)
VT1311b^K直定位符号 Vertical tab
FF1412c^L换页键 Form Feed, page eject
CR1513d^M回车 [Enter] Carriage Return CHR(13)
SO1614e^N取消变换 Shift Out, 替代字符集
SI1715f^O启用变换 Shift In, 恢復默认字符集
DLE201610^P跳出资料通讯 Data link escape
DC1211711^Q设备控制一 Device control 1 (XON)
DC2221812^R设备控制二 Device control 2
DC3231913^S设备控制三 Device control 3 (XOFF)
DC4242014^T设备控制四 Device control 4
NAK252115^U否定失败回应 Negative acknowledge
SYN262216^V同步用暂停 Synchronous idle
ETB272317^W区块传输结束 End Submission block, 与 EOT 不同
CAN302417^X取消 Cancel line
EM312519^Y连线媒介中断 End of medium, Ctrl + Y 中断
SUB32261a^Z替代字符 Substitute
ESC33271b^[退出键 Escape, Esc
FS34281c^\档案分割符 File Separator
GS35291d^]群组分隔符 Group Separator
RS36301e^^记录分隔符 Record Separator, 块模终止符
US37311f^_单元分隔符 Unit Separator

ASCII 标准字符、十进位 32~127 编码

Char (字符)八进位 Octal十进位 Dec十六进位 Hex描述 Description
SP403220Space
!413321Exclamation mark
"423422Quotation mark ( " in HTML)
#433523Cross hatch (number sign)
$443624Dollar sign
%453725Percent sign
&463826Ampersand
`473927Closing single quote (apostrophe)
(504028Opening parentheses
)514129Closing parentheses
*52422aAsterisk (star, multiply)
+53432bPlus
,54442cComma
-55452dHyphen, dash, minus
.56462ePeriod
/57472fSlant (forward slash, divide)
0604830Zero
1614931One
2625032Two
3635133Three
4645234Four
5655335Five
6665436Six
7675537Seven
8705638Eight
9715739Nine
:72583aColon
;73593bSemicolon
<74603cLess than sign (< in HTML)
=75613dEquals sign
>76623eGreater than sign (> in HTML)
?77633fQuestion mark
@1006440At-sign
A1016541Uppercase A
B1026642Uppercase B
C1036743Uppercase C
D1046844Uppercase D
E1056945Uppercase E
F1067046Uppercase F
G1077147Uppercase G
H1107248Uppercase H
I1117349Uppercase I
J112744aUppercase J
K113754bUppercase K
L114764cUppercase L
M115774dUppercase M
N116784eUppercase N
O117794fUppercase O
P1208050Uppercase P
Q1218151Uppercase Q
R1228252Uppercase R
S1238353Uppercase S
T1248454Uppercase T
U1258555Uppercase U
V1268656Uppercase V
W1278757Uppercase W
X1308858Uppercase X
Y1318959Uppercase Y
Z132905aUppercase Z
[133915bOpening square bracket
\134925cReverse slant (Backslash)
]135935dClosing square bracket
^136945eCaret (Circumflex)
_137955fUnderscore
`1409660Opening single quote
a1419761Lowercase a
b1429862Lowercase b
c1439963Lowercase c
d14410064Lowercase d
e14510165Lowercase e
f14610266Lowercase f
g14710367Lowercase g
h15010468Lowercase h
i15110569Lowercase i
j1521066aLowercase j
k1531076bLowercase k
l1541086cLowercase l
m1551096dLowercase m
n1561106eLowercase n
o1571116fLowercase o
p16011270Lowercase p
q16111371Lowercase q
r16211472Lowercase r
s16311573Lowercase s
t16411674Lowercase t
u16511775Lowercase u
v16611876Lowercase v
w16711977Lowercase w
x17012078Lowercase x
y17112179Lowercase y
z1721227aLowercase z
{1731237bOpening curly brace
|1741247cVertical line
}1751257dClosing curly brace
~1761267eTilde (approximate)
DEL1771277fDelete (rubout), cross-hatch box

资讯交换码

标准资讯交换码,互联网 Internet 号码分配机构 IANA 使用现代名称 US-ASCII。通过这种方式使用统一、字符处理、字符保存、通信和印刷通用符号,ASCII 主要用于网路讯息间传递、电子通信的字符编码标准、最初定义基于英文字母表 0~127128 个字符编码为 7 位整数之信息交换标准代码。包括 32 个非打印控制用字符、加上 95 个可显示编码字符,数字 0-9 和小写字母 a-z 和大写字母 A-Z 以及标点符号和可显示列印符号。




ASCII 扩展字符 128~255

Char (字符) 八进位 Octal十进位 Dec十六进位 Hex描述 Description
Ç20012880Majuscule C-cedilla
ü20112981Letter u with Umlaut or Diuresis, u-umlaut
é20213082Letter e with Acute accent or e-acute
â20313183Letter a with Circumflex accent or a-circumflex
ä20413284Letter a with Umlaut or diuresis, a-umlaut
à20513385Letter a with Grave accent
å20613486Letter a with a Ring
ç20713587Minuscule C-Cedilla
ê21013688Letter e with Circumflex accent or e-circumflex
ë21113789Letter e with Umlaut or diuresis, e-umlauts
è2121388aLetter e with Grave accent
ï2131398bLetter i with Umlaut or diuresis, i-umlaut
î2141408cLetter i with Circumflex accent or i-circumflex
ì2151418dLetter i with Grave accent
Ä2161428eLetter A with Umlaut or Diuresis, A-umlaut
Å2171438fCapital letter A with a ring
É22014490Capital letter E with acute accent or E-acute
æ22114591Latin Diphthong AE in lowercase
Æ22214692Latin Diphthong AE in uppercase
ô22314793Letter o with Circumflex accent or o-circumflex
ö22414894Letter o with Umlaut or diuresis, o-umlaut
ò22514995Letter o with Grave accent
û22615096Letter u with Circumflex accent or u-circumflex
ù22715197Letter u with Grave accent
ÿ23015298Lowercase Letter Y with diuresis
Ö23115399Letter O with Umlaut or diuresis, O-umlaut
Ü2321549aLetter U with Umlaut or diuresis, U-umlaut
ø2331559bLowercase Slashed zero or empty set
£2341569cPound sign, Symbol for the pound sterling
Ø2351579dUppercase slashed zero or empty set
×2361589eMultiplication sign
ƒ2371599fFunction sign, F with hook sign, florin sign
á240160a0Lowercase Letter a with acute accent or a-acute
í241161a1Lowercase Letter i with acute accent or i-acute
ó242162a2Lowercase Letter o with acute accent or o-acute
ú243163a3Lowercase Letter u with acute accent or u-acute
ñ244164a4Enie, eñe, spanish letter, lowercase n with tilde
Ñ245165a5Spanish letter, uppercase N with tilde, EÑE
ª246166a6Feminine ordinal indicator
º247167a7Masculine ordinal indicator
¿250168a8Inverted question marks
®251169a9Registered trademark symbol
¬252170aaLogical negation symbol
½253171abOne half
¼254172acQuarter, one fourth
¡255173adInverted exclamation marks
«256174aeAngle quotes, guillemets, right-pointing quotation mark
»257175afGuillemets, angle quotes, left-pointing quotation marks
260176b0Graphic character, low density dotted
261177b1Graphic character, medium density dotted
262178b2Graphic character, high density dotted
263179b3Box drawing character single vertical line
264180b4Box drawing character single vertical and left line
Á265181b5Capital letter A with acute accent or A-acute
Â266182b6Letter A with circumflex accent or A-circumflex
À267183b7Letter A with grave accent
©270184b8Copyright symbol
271185b9Box drawing character double line vertical and left
272186baBox drawing character double vertical line
273187bbBox drawing character double line upper right corner
274188bcBox drawing character double line lower right corner
¢275189bdCent symbol
¥276190beYEN and YUAN sign
277191bfBox drawing character single line upper right corner
300192c0Box drawing character single line lower left corner
301193c1Box drawing character single line horizontal and up
302194c2Box drawing character single line horizontal down
303195c3Box drawing character single line vertical and right
304196c4Box drawing character single horizontal line
305197c5Box drawing character single line horizontal vertical
ã306198c6Lowercase letter a with tilde or a-tilde
Ã307199c7Capital letter A with tilde or A-tilde
310200c8Box drawing character double line lower left corner
311201c9Box drawing character double line upper left corner
312202caBox drawing character double line horizontal and up
313203cbBox drawing character double line horizontal down
314204ccBox drawing character double line vertical and right
315205cdBox drawing character double horizontal line
316206ceBox drawing character double line horizontal vertical
¤317207cfGeneric currency sign
ð320208d0Lowercase letter eth
Ð321209d1Capital letter Eth
Ê322210d2Letter E with circumflex accent or E-circumflex
Ë323211d3Letter E with umlaut or diuresis, E-umlaut
È324212d4Capital letter E with grave accent
ı325213d5Lowercase dot less i
Í326214d6Capital letter I with acute accent or I-acute
Î327215d7Letter I with circumflex accent or I-circumflex
Ï330216d8Letter I with umlaut or diuresis, I-umlaut
331217d9Box drawing character single line lower right corner
332218daBox drawing character single line upper left corner
333219dbBlock, graphic character
334220dcBottom half block
¦335221ddVertical broken bar
Ì336222deCapital letter I with grave accent
337223dfTop half block
Ó340224e0Capital letter O with acute accent or O-acute
ß341225e1Letter Eszett, scharfes S or sharp S
Ô342226e2Letter O with circumflex accent or O-circumflex
Ò343227e3Capital letter O with grave accent
õ344228e4Lowercase letter o with tilde or o-tilde
Õ345229e5Capital letter O with tilde or O-tilde
µ346230e6Lowercase letter Mu, micro sign or micron
þ347231e7Lowercase letter Thorn
Þ350232e8Capital letter Thorn
Ú351233e9Capital letter U with acute accent or U-acute
Û352234eaLetter U with circumflex accent or U-circumflex
Ù353235ebCapital letter U with grave accent
ý354236ecLowercase letter y with acute accent
Ý355237edCapital letter Y with acute accent
¯356238eeMacron symbol
´357239efAcute accent
360240f0Congruence relation symbol
±361241f1Plus-minus sign
362242f2underline or underscore
¾363243f3three quarters, three-fourths
364244f4Paragraph sign or pilcrow, end paragraph mark
§365245f5Section sign
÷366246f6The division sign, Obelus
¸367247f7cedilla
°370248f8Degree symbol
¨371249f9Diaresis
·372250faInterpunct or space dot
¹373251fbSuperscript one, exponent 1, first power
³374252fcSuperscript three, exponent 3, cube, third power
²375253fdSuperscript two, exponent 2, square, second power
376254feblack square
&nbsp;377255ffNon-breaking space or no-break space