3 ms·
> Unicode allocates 2²¹ (~2 mil) characters called codepoints. Sorry, programmers, but it’s not a multiply of 8 . Why would 2^21 not be a multiple of 2^3?
by woko 6y ago
> Unicode allocates 2²¹ (~2 mil) characters called codepoints. Sorry, programmers, but it’s not a multiply of 8 .
Why would 2^21 not be a multiple of 2^3?
- RedNifre 6y agoIt's a typo, they meant ~2²¹ instead of 2²¹, because it's 17*2^16, which is more like ~2^20.087. (And that's not even true either, since a couple values like FFFF are forbidden)
- deleted 6y ago[deleted]
- howtodowtle 6y agoOf course, 17 x 2^16 is also a multiple of 2^3: 17 x 2^16 = 17 x 2^13 x 2^3 (reposted/edited because * was interpreted as formatting)
- RedNifre 6y agoIn case hacker news doesn't show emoji, I meant m( Right, I guess I was thinking more of "not a power of 2" instead of "not a multiple of 8". On second thought, the author might have meant "Sorry that the exponent is not a multiple of 8" as in Unicode neither has 2^16 nor 2^32 code points.
- kps 6y agoAgreed; they meant “not a power of 2⁸”.