为什么度数符号不同于Unicode的UTF-8? [英] Why Degree symbol differs from UTF-8 from unicode?
问题描述
为什么度数符号与Unicode的UTF-8不同?
Why Degree symbol differs from UTF-8 from unicode?
根据: http://www.utf8-chartable.de/和 http://www.fileformat.info/info/unicode/char/b0/index.htm
unicode是 B0 ,但UTF-8是 C2 B0 怎么了!
unicode is B0 but UTF-8 is C2 B0 How come!??
推荐答案
UTF-8是一种使用可变字节数(字节数取决于代码点)对UTF字符进行编码的方法.
UTF-8 is a way to encode UTF characters using variable number of bytes (the number of bytes depends on the code point).
U + 0080和U + 07FF之间的代码点使用以下2个字节的编码:
Code points between U+0080 and U+07FF use the following 2-byte encoding:
110xxxxx 10xxxxxx
其中x
代表要编码的代码点的位.
where x
represent the bits of the code point being encoded.
让我们考虑U + 00B0.以二进制形式,0xB0为10110000.如果将这些位替换为上述模板,则得到:
Let's consider U+00B0. In binary, 0xB0 is 10110000. If one substitutes the bits into the above template, one gets:
11000010 10110000
以十六进制表示的是0xC2 0xB0.
In hex, this is 0xC2 0xB0.
这篇关于为什么度数符号不同于Unicode的UTF-8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!