4 ms·
One of the most frustrating thing with Windows is the UTF16/UCS2/etc wide chars needed everywhere with their APIs. UTF8 is so much nicer to deal with in almost
by adzm 4y ago
One of the most frustrating thing with Windows is the UTF16/UCS2/etc wide chars needed everywhere with their APIs. UTF8 is so much nicer to deal with in almost every situation. Things are starting to get better on that end but it's still behind compatibility flags that third party libraries may not handle properly anyway. It's probably a minor annoyance, but seems entirely unnecessary now that you may need more than one wchar to encode a character anyway.
- jetbalsa 4y agoI bet that came down as strings coming from the filesystem, or user for that matter might be in a language that requires UTF16 to properly be used.
- pjc50 4y agoIt came about because Microsoft deployed what they called "unicode" before UTF-8 was standardized. In Microsoft-land "Unicode" means UTF-16. This isn't great but it's also baked into all the APIs.
- account42 4y agoThey could always use WTF-8 for the filesystem APIs which can encode all WTF-16 strings (i.e. the encoding that Windows actually uses).
- cshokie 4y agoIn a lot of ways Windows predates that being an option. This blog post has more of the history on that: https://devblogs.microsoft.com/oldnewthing/20190830-00/?p=102823 https://devblogs.microsoft.com/oldnewthing/20190830-00/?p=10...