2 ms·
It depends on the encoding: In UTF-16, a lot of characters have 0x00 as part of their encoding. That's the null byte, even if the software isn't technically sup
by msla 4y ago
It depends on the encoding: In UTF-16, a lot of characters have 0x00 as part of their encoding. That's the null byte, even if the software isn't technically supposed to see it that way, so it's a valid test. (Easy, too: Any character that's also in ASCII will be represented with a 0x00 byte in UTF-16.) Of course, UTF-8 solves that problem, plus the problem of surrogate pairs.
- fsckboy 4y ago> That's the null byte, even if the software isn't technically supposed to see it that way that's a null byte, even if the spec says it's not the string terminator. i just think it's worth referring to things by using words that more precise semantics if possible