A filesystem for namespaces
A filesystem for namespaces
Posted Dec 6, 2021 6:53 UTC (Mon) by NYKevin (subscriber, #129325)In reply to: A filesystem for namespaces by marcH
Parent article: A filesystem for namespaces
As I understand the history here, UTF-8 did not exist at this point. Your options were UCS-2, UCS-4, or "ANSI" (i.e. various legacy non-Unicode codepages such as the venerable Windows-1252). Sun and Microsoft opted for UCS-2, other vendors either picked UCS-4 or ignored the problem. Then the Unicode people realized that UCS-2 was too small to encode everything, and introduced surrogates (creating UTF-16, and renaming UCS-4 to UTF-32 for consistency).
Much later, UTF-8 was introduced as a hack to make non-Unicode aware APIs (i.e. APIs which are incompatible with both UTF-16 and UTF-32, usually because they assumed "no embedded nulls") handle Unicode transparently, or at least in a way that was not entirely wrong. The alternative would have been to introduce wchar_t versions of the entire POSIX API, which would have sucked (and is exactly what Windows ended up doing for backcompat with "ANSI" programs).