5 ms·
UCS-2 was all there was at the time, though. Blame Unicode for thinking 65,536 code points would be enough.
by mikeash 8y ago
UCS-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.