3 ms·
Quite true. One of the things Windows got very wrong was UCS-2 and, later, UTF-16. So did JavaScript.
by cryptonector 5y ago
Quite true. One of the things Windows got very wrong was UCS-2 and, later, UTF-16. So did JavaScript.
- int_19h 5y agoAnd macOS, and Java, and Qt, and ... It's almost as if it was universally seen as a good idea at the time. ~
- cryptonector 5y agoYes. I'm a bit surprised it took so long for someone to come up with something better. But if someone had tried and had come up with anything other than Rob Pike's UTF-8, we might still be sad. Sometimes you have to make mistakes before you know that's what they were.
- p_l 5y agoThe problem is that everyone wanted to keep simple array semantics for text, and that's not really workable with full scope of Unicode (even if you have 21-bit code points exposed, Runes, etc.)
- cryptonector 5y agoOn the plus side, because Unix was so ASCII-based, it couldn't easily make the jump to UCS-2/wchar_t. I suspect this was ultimately the motivation that led to UTF-8 (both, IBM's first attempt and Rob Pike's winner). Being late to the game sometimes means you're more prepared.