3 ms·
> The strangest thing about Unicode (any flavor) is that NULL, aka \0, aka "all zeros" is a valid character. This is either false or misleading, depending on w
by derleth 15y ago
> The strangest thing about Unicode (any flavor) is that NULL, aka \0, aka "all zeros" is a valid character.
This is either false or misleading, depending on what you're talking about.
In UTF-8, '\0' is all-bits-zero, one byte, and means the same thing as it does in ASCII. It cannot occur in the encoding of any other character.
In UTF-16, the byte 0x00 may validly occur within the encoding of a character that is not '\0'. The same is true for UCS-4.
This is a big reason UTF-8 is as popular as it is.