Re:Sudo Replacement
by Dylan16807 on Friday January 20, 2023 @07:01PM
(#34462046)
I wouldn't call that "being Unicode" though, since null byte is in ASCII.
[ Parent
| on HN ]
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.
> 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