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