3 ms·
The NT kernel represents all strings as UTF-16 internally AND in the syscall API. This single fact is enough to make it clear that it's a piece of shit.
by ulpis 14y ago
The NT kernel represents all strings as UTF-16 internally AND in the syscall API.
This single fact is enough to make it clear that it's a piece of shit.
- ComputerGuru 14y agoSo? NT predates UTF-8. UTF-8 and UTF-16 are both awesome - they provide unicode support. Windows first shipped with UCS-2 at a time when the rest of the world was stuck with ASCII and various random codepages, then switched over to UTF-16 at around the same time UTF-8 was picking up speed; UTF-16 had the unique advantage of being (mostly) backwards-compatible with UCS-2, whereas UTF-8 would have broken everything. I prefer UTF-8 myself, but that doesn't make UTF-16 a bad choice. In fact, while for the default ASCII range of characters UTF-16 consumes one extra byte over UTF-8's single-byte encoding, once you get into the "normally-used range" of international characters, UTF-8 quickly jumps to 3 bytes while UTF-16 remains at two.
- nbevans 14y agoThere's nothing wrong with UTF-16.
- Dylan16807 14y agoYes there is. It's variable width without being backwards compatible to ASCII. Even worse it's variable width but lets people assume it's fixed-width. UCS-2 was okay. UTF-16 is a hack.