3 ms·
Why would you ever need 31 bits? That's over TWO BILLION distinct codepoints. Only ~137K have been assigned so far, or in other words a little over 17 bits. Gi
by userbinator 7y ago
Why would you ever need 31 bits? That's over TWO BILLION distinct codepoints.
Only ~137K have been assigned so far, or in other words a little over 17 bits. Given that each additional bit doubles the range, even in the case that characters continue to be assigned at a constant rate, reaching that high is so far into the future that it's not worth thinking about. Unicode is around 30 years old; at the same rate, another 30 years would be needed to get to 18 bits, then another 60, 120, ...
On the other hand, it is extremely wasteful to burden all UTF-8 processing code with handling values that will literally never be encountered outside of error cases.