3 ms·
For a minute I was wondering why they weren't making it UTF-7 like everything else. Then I realized that it's UTF-8. I'm sleepy haha. However, in UTF-8, 7 bits
by benatkin 4y ago
For a minute I was wondering why they weren't making it UTF-7 like everything else. Then I realized that it's UTF-8. I'm sleepy haha.
However, in UTF-8, 7 bits are what is available to distinguish between characters that take only one byte. U+0000 through U+007F, or 0x00 through 0x7F. Ones starting with the first byte 0x80 or higher are chonkier. https://www.youtube.com/watch?v=NQFMeyWVe3g https://www.youtube.com/watch?v=NQFMeyWVe3g
- bigDinosaur 4y ago7 bits to encode characters of one byte is for ASCII compatibility, ASCII of course being a 7 bit encoding.
- benatkin 4y agoI'm not sure that's the only reason. That is also lucky :) I guess I will have to read about those who made it. (The official story may not tell all.) It's not ideal just for that reason but because 7 bits is a good amount to preserve for other characters, as well as the simplicity of only having to check one bit to tell it to look at the next byte to find what character it is. It could have been all but one to say that it isn't a single byte character. Then there would be 255 single byte characters and 256 two byte characters, minus however many you use to specify that there are more bytes. It would be easy to make an encoding format where 0x00 or 0xFF (0b00000000 or 0b11111111) say to look at the next byte, but that would suck as a general text encoding format.