Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果 UTF-32 是 UCS-4 限制为 17 个平面(1114111 个字符点),需要 21 位,那么第四个字节在做什么?
第四个字节只是坐在那里,占用空间(用 0 填充)。
理论上,可以设计 21 位或 24 位交换格式。在实践中,这两者都很尴尬。很少(如果有的话)现代计算机具有 21 位或 24 位数据类型。由于 32 位字很容易使用,因此通常使用它们来存储最大值远小于 2 31 -1 的数值数据类型。