←back to thread

238 points GalaxySnail | 2 comments | | HN request time: 0.398s | source
Show context
Affric ◴[] No.40169026[source]
Make UTF-8 default on Windows
replies(6): >>40169144 #>>40169474 #>>40170343 #>>40171178 #>>40173598 #>>40175253 #
pjc50 ◴[] No.40170343[source]
In addition to ApiFunctionA and ApiFunctionW, introduce ApiFunction8? (times whole API surface)

Introduce a #define UNICODE_NO_REALLY_ALL_UNICODE_WE_MEAN_IT_THIS_TIME ?

replies(1): >>40170814 #
cryptonector ◴[] No.40170814[source]
ApiFunctionA is UTF-8 capable. Needs a run-time switch too, not just compile-time.
replies(3): >>40170987 #>>40173012 #>>40174417 #
1. ComputerGuru ◴[] No.40173012[source]
Only under windows 11, I believe. And that switch is off by default.
replies(1): >>40174609 #
2. int_19h ◴[] No.40174609[source]
You're thinking of the global setting that is enabled by the user and applies to all apps that operate in terms of "current code page" - if enabled, that codepage becomes 65001 (UTF-8).

However, on Win10+, apps themselves can explicitly opt into UTF-8 for all non-widechar Win32 APIs regardless of the current locale/codepage.