4 ms·
>If the two involved parties would have known of each other [...], I guess Windows could have used UTF-8 right from the start. Probably not. The author of thi
by jasode 5y ago
>If the two involved parties would have known of each other [...], I guess Windows could have used UTF-8 right from the start.
Probably not. The author of this thread's article has incorrect history about UTF-8 being widely accepted in 1993. At least 4 different systems independently chose UCS2/UCS4 instead of UTF-8 in the early 1990s:
- Microsoft Windows NT 3.1
- Sun Java in 1995
- Netscape Javascript in 1995
- Python 2.x
Why? Because before 1996, the Unicode Consortium initially thought 16-bit 65k characters was "more than enough" based on the CJK unification first recommended by language experts from Asia. The wikipedia page on Unicode revision history shows the explosion of extra CJK chars in Unicode 3.1 which exceeded count of 65k didn't happen until 2001:
https://en.wikipedia.org/wiki/Unicode#Versions https://en.wikipedia.org/wiki/Unicode#Versions
The prevailing standard in 1993 was UCS-2 and not UTF-8. Considering that a huge revision of an operating system like Windows is a multi-year effort, they were really looking at what the standard was circa ~1991. So Rob Pike's napkin idea of UTF-8 in 1992 and then the later presentation at USENIX in January 1993 -- is really not relevant for a July 1993 release of Windows NT 3.1. The author writing in Dec 2021 has hindsight bias but MS/Java/Python just went with Unicode 1.x UCS2 which was logical at that time.
- ChrisSD 5y agoKen Thompson was the one scribbling on a napkin. Rob was the one telling the story later on.
- my123 5y agoIn 1991, the decision was way beyond made: https://betawiki.net/wiki/Windows_NT_3.1_October_1991_build https://betawiki.net/wiki/Windows_NT_3.1_October_1991_build
- feldrim 5y agoThere're several mistakes in the history. Just like any article, it is based on the biases of the author.
- mpyne 5y agoEven by 1999, when Qt 2 was released, the new "Unicode-aware" QString class used UTF-16 internally, not UTF-8. This remains the internal Qt encoding even today (see https://wiki.qt.io/QString#Unicode_methods_in_QString https://wiki.qt.io/QString#Unicode_methods_in_QString), although the support for UTF-8 has improved substantially, to the point that Qt assumes that 8-bit strings not provided an alternate encoding are UTF-8, that 8-bit filenames can be expressed as UTF-8, and so on (see https://doc.qt.io/qt-6/unicode.html https://doc.qt.io/qt-6/unicode.html).