![]() |
1
5
解码代理项对时需要添加0x10000;引用 rfc 2781 ,您缺少的步骤是第5步: 1) If W1 < 0xD800 or W1 > 0xDFFF, the character value U is the value of W1. Terminate. 2) Determine if W1 is between 0xD800 and 0xDBFF. If not, the sequence is in error and no valid character can be obtained using W1. Terminate. 3) If there is no W2 (that is, the sequence ends with W1), or if W2 is not between 0xDC00 and 0xDFFF, the sequence is in error. Terminate. 4) Construct a 20-bit unsigned integer U', taking the 10 low-order bits of W1 as its 10 high-order bits and the 10 low-order bits of W2 as its 10 low-order bits. 5) Add 0x10000 to U' to obtain the character value U. Terminate.
|
![]() |
2
0
你好像少了一个偏移量
this WIKI page ,UTF-16代理项对的构造如下:
|
![]() |
Community wiki · C中有哪些耗时的操作? 1 年前 |
![]() |
Community wiki · 将所有处理器电源都投入到任务中 1 年前 |
![]() |
Community wiki · C++为C添加了什么?[已关闭] 1 年前 |
![]() |
Community wiki · 打印1到1000,不带循环或条件 1 年前 |