What does “Beta: Use Unicode UTF-8 for worldwide language support” actually do?

后端 未结 2 1600
半阙折子戏
半阙折子戏 2020-12-14 18:33

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\".

2条回答
  •  轮回少年
    2020-12-14 19:06

    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.)

提交回复
热议问题