可能重复: Why UTF-32 exists whereas only 21 bits are necessary to encode every character? 最大Unicode代码点是在0x10FFFF在UTF-32。 UTF-32有21个信息位和11个多余的空白位。那么,为什么没有UTF-24编码(即删除高位字节的UTF-32)来存储3个字节而不是4个编码点?
我想打印出一串UTF-16字符。我后来发布了这个问题,给出的建议是使用iconv转换为UTF-32并将其打印为wchar_t字符串。 我做了一些研究,并成功地编写以下: // *c is the pointer to the characters (UTF-16) i'm trying to print
// sz is the size in bytes of the input i'm tr