3 ms·
> If you're writing low level code, you have to convert UTF-8 to UTF-16 and back. It depends. If you're writing an app, just add the necessary incantation to y
by int_19h 3y ago
> If you're writing low level code, you have to convert UTF-8 to UTF-16 and back.
It depends. If you're writing an app, just add the necessary incantation to your manifest, and all the narrow char APIs start talking UTF-8 to you.
For a library, yeah.
- ezoe 3y agoDon't be surprised such UTF-8 locale program will break so bad on Windows with default language set to Japanese.
- int_19h 3y agoWhy would it break? If you just assume that the system codepage is UTF-8, then sure. If you specifically say in your manifest that you want UTF-8, then Windows (10+) will give you UTF-8 regardless of which locale it is: https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page https://learn.microsoft.com/en-us/windows/apps/design/global...