3 ms·
Just as additional context, since this seems to come up a lot - that does not mean that UTF-8 is bad. The main alternative is UTF-32, which provides random acc
by comex 11y ago
Just as additional context, since this seems to come up a lot - that does not mean that UTF-8 is bad. The main alternative is UTF-32, which provides random access to codepoints rather than bytes, but since Unicode graphemes consist of multiple codepoints, UTF-32 is effectively a variable width encoding as well for most purposes, just one that uses much more memory than UTF-8 most of the time and never uses less.
- steveklabnik 11y agoOh yeah, I don't think any of this makes UTF-8 bad, in fact, I think it's the best choice. It just reveals the inherent complexity in handling string data.