3 ms·
> If you compare Unicode support in platforms and OSes where this was clearly a thought (Windows, C#, Java) Their insistence on UCS2 however gave us the worst
by the_mitsuhiko 8y ago
> If you compare Unicode support in platforms and OSes where this was clearly a thought (Windows, C#, Java)
Their insistence on UCS2 however gave us the worst outcome of all. We have forever lost all north of 23 bits for characters due to UTF16. The result of this misdesign creates bigger problem than C’s char type.
- mikeash 8y agoUCS-2 was all there was at the time, though. Blame Unicode for thinking 65,536 code points would be enough.
- gpderetta 8y agoThat's not a very good excuse though: UTF-8 was invented, by Thompson and Pike, specifically because existing solutions were not deemed adequate for their needs. "Reasonable people adapt themselves to the world. Unreasonable people attempt to adapt the world to themselves. All progress, therefore, depends on unreasonable people"
- mikeash 8y agoWhen Java and friends were being designed, it looked like 16 bits would be adequate. They didn’t insist on UCS-2 over something better, they chose what looked like the best option at the time. It later turned out not to be. UTF-16 was created to fix that problem without having to completely redo their strings from scratch. Likewise, C was created in a time when it looked like 7 or 8 bits would suffice. That turned out to be wrong. UTF-8 was invented to solve that problem without redoing C strings from scratch.