In some Windows 10 builds (insiders starting April 2018 and also \"normal\" 1903) there is a new option called \"Beta: Use Unicode UTF-8 for worldwide language support\".
You can see it in ProcMon.
It seems to set the REG_SZ
values ACP
, MACCP
, and OEMCP
in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage
to 65001
.
I'm not entirely sure but it might be related to the variable gAnsiCodePage
in KernelBase.dll
, which GetACP
reads. If you really want to, you might be able to change it dynamically for your program regardless of the system setting by dynamically disassembling GetACP
to find the instruction sequence that reads gAnsiCodePage
and obtaining a pointer to it, then updating the variable directly.
(Actually, I see references to an undocumented function named SetCPGlobal that would've done the job, but I can't find that function on my system. Not sure if it still exists.)
Most Windows C APIs come in two different variants:
The official Microsoft advice is not to use the "A" versions, but to ensure your code always use uses the "W" variants. That way you're supposed to get consistent behaviour no matter what the user's country/language is configured as.
However, it looks like that checkbox is doing more than one thing. It's clear it's supposed to change the "ANSI Code Page" to 65001, which means UTF-8. It looks like it's also changing font rendering to be more Unicody.
I suggest you detect if GetACP() == 65001, then draw the Unicode version of your strings, otherwise draw the old "0r" version. I'm not sure how you do that from .NET...