BOM(Byte Order Mark),字节顺序标记,出现在文本文件头部,Unicode编码标准中用于标识文件是采用哪种格式的编码,但它对于文件的读者来说是不可见字符。
下表列出不同的字符编码的BOM
编码 | BOM (十六进制) | BOM (十进制) | CP1252 字符 |
---|---|---|---|
UTF-8[t 1] | EF BB BF |
239 187 191 |
??? |
UTF-16 (BE) | FE FF |
254 255 |
t? |
UTF-16 (LE) | FF FE |
255 254 |
?t |
UTF-32 (BE) | 00 00 FE FF |
0 0 254 255 |
??t? (? refers to the ASCII null character) |
UTF-32 (LE) | FF FE 00 00 |
255 254 0 0 |
?t?? (? refers to the ASCII null character) |
UTF-7[t 1] | 2B 2F 76 38 2B 2F 76 39 2B 2F 76 2B 2B 2F 76 2F [t 2]2B 2F 76 38 2D [t 3] |
43 47 118 56 43 47 118 57 43 47 118 43 43 47 118 47 43 47 118 56 45 |
+/v8 +/v9 +/v+ +/v/ +/v8- |
UTF-1[t 1] | F7 64 4C |
247 100 76 |
÷dL |
UTF-EBCDIC[t 1] | DD 73 66 73 |
221 115 102 115 |
Ysfs |
SCSU[t 1] | 0E FE FF [t 4] |
14 254 255 |
?t? (? represents the ASCII “shift out” character) |
BOCU-1[t 1] | FB EE 28 |
251 238 40 |
??( |
GB-18030[t 1] | 84 31 95 33 |
132 49 149 51 |
?1?3
|
参考:http://en.wikipedia.org/wiki/Byte_order_mark
时间: 2024-10-11 00:52:51