UTF-8
出自福留子孫
UTF-8編碼位元組含義:
- ◽◾◾◾◾◾◾◾,對於UTF-8編碼中的任意位元組B,如果B的第一位為0,則B獨立的表示一個字元(ASCII碼);
- ◾◽??????,128~191,如果B的第一位為1,第二位為0,則B為一個多位元組字元中的一個位元組(非ASCII字元);
- 識別位元固定為 128 ,表值 0~63。
- ◾◾◽?????,192~223,如果B的前兩位為1,第三位為0,則B為兩個位元組表示的字元中的第一個位元組;
- 識別位元固定為 192 ,(0~31)×64。
- ◾◾◾◽????,224~239,如果B的前三位為1,第四位為0,則B為三個位元組表示的字元中的第一個位元組;
- ◾◾◾◾◽???,240~247,如果B的前四位為1,第五位為0,則B為四個位元組表示的字元中的第一個位元組;
組成字(以「瓦」的中文 3 byte 為例):
- 第一 byte 231, 231-224=7 ,單位 4096
- 第二 byte 147, 147-128=19 ,單位 64
- 第三 byte 166, 166-128=38 ,單位 1
- 字碼 = 7×4096+19×64+38=29926 ,字碼寫成 瓦
0~127
0~31 控制字元
DEC | OCT | HEX | BIN | Symbol | HTML Number | HTML Name | Description |
---|---|---|---|---|---|---|---|
<a href='/0' title='ASCII Code 0'>0</a> | 000 | 00 | 00000000 | NUL | � | Null character | |
<a href='/1' title='ASCII Code 1'>1</a> | 001 | 01 | 00000001 | SOH |  | Start of Heading | |
<a href='/2' title='ASCII Code 2'>2</a> | 002 | 02 | 00000010 | STX |  | Start of Text | |
<a href='/3' title='ASCII Code 3'>3</a> | 003 | 03 | 00000011 | ETX |  | End of Text | |
<a href='/4' title='ASCII Code 4'>4</a> | 004 | 04 | 00000100 | EOT |  | End of Transmission | |
<a href='/5' title='ASCII Code 5'>5</a> | 005 | 05 | 00000101 | ENQ |  | Enquiry | |
<a href='/6' title='ASCII Code 6'>6</a> | 006 | 06 | 00000110 | ACK |  | Acknowledge | |
<a href='/7' title='ASCII Code 7'>7</a> | 007 | 07 | 00000111 | BEL |  | Bell, Alert | |
<a href='/8' title='ASCII Code 8'>8</a> | 010 | 08 | 00001000 | BS |  | Backspace | |
<a href='/9' title='ASCII Code 9'>9</a> | 011 | 09 | 00001001 | HT | 	 | Horizontal Tab | |
<a href='/10' title='ASCII Code 10'>10</a> | 012 | 0A | 00001010 | LF | | Line Feed | |
<a href='/11' title='ASCII Code 11'>11</a> | 013 | 0B | 00001011 | VT |  | Vertical Tabulation | |
<a href='/12' title='ASCII Code 12'>12</a> | 014 | 0C | 00001100 | FF |  | Form Feed | |
<a href='/13' title='ASCII Code 13'>13</a> | 015 | 0D | 00001101 | CR | | Carriage Return | |
<a href='/14' title='ASCII Code 14'>14</a> | 016 | 0E | 00001110 | SO |  | Shift Out | |
<a href='/15' title='ASCII Code 15'>15</a> | 017 | 0F | 00001111 | SI |  | Shift In | |
<a href='/16' title='ASCII Code 16'>16</a> | 020 | 10 | 00010000 | DLE |  | Data Link Escape | |
<a href='/17' title='ASCII Code 17'>17</a> | 021 | 11 | 00010001 | DC1 |  | Device Control One (XON) | |
<a href='/18' title='ASCII Code 18'>18</a> | 022 | 12 | 00010010 | DC2 |  | Device Control Two | |
<a href='/19' title='ASCII Code 19'>19</a> | 023 | 13 | 00010011 | DC3 |  | Device Control Three (XOFF) | |
<a href='/20' title='ASCII Code 20'>20</a> | 024 | 14 | 00010100 | DC4 |  | Device Control Four | |
<a href='/21' title='ASCII Code 21'>21</a> | 025 | 15 | 00010101 | NAK |  | Negative Acknowledge | |
<a href='/22' title='ASCII Code 22'>22</a> | 026 | 16 | 00010110 | SYN |  | Synchronous Idle | |
<a href='/23' title='ASCII Code 23'>23</a> | 027 | 17 | 00010111 | ETB |  | End of Transmission Block | |
<a href='/24' title='ASCII Code 24'>24</a> | 030 | 18 | 00011000 | CAN |  | Cancel | |
<a href='/25' title='ASCII Code 25'>25</a> | 031 | 19 | 00011001 | EM |  | End of medium | |
<a href='/26' title='ASCII Code 26'>26</a> | 032 | 1A | 00011010 | SUB |  | Substitute | |
<a href='/27' title='ASCII Code 27'>27</a> | 033 | 1B | 00011011 | ESC |  | Escape | |
<a href='/28' title='ASCII Code 28'>28</a> | 034 | 1C | 00011100 | FS |  | File Separator | |
<a href='/29' title='ASCII Code 29'>29</a> | 035 | 1D | 00011101 | GS |  | Group Separator | |
<a href='/30' title='ASCII Code 30'>30</a> | 036 | 1E | 00011110 | RS |  | Record Separator | |
<a href='/31' title='ASCII Code 31'>31</a> | 037 | 1F | 00011111 | US |  | Unit Separator |
32~31 控制字元
===等價===: 「◾◽??????」與「◽◽??????」皆合法且等價