Can someone tell me how to programmatically change the standard code page of Windows XP (I am doing this from Delphi)? (This will be the equivalent of switching to Control Panel → Regional Settings → Language for applications other than Unicode).
In this case, I want to switch to Chinese (PRC), so I write the following registry lines: HKLM \ SYSTEM \ CurrentControlSet \ Control \ Nls \ CodePage \ ACP = 936 MACCP = 10008 OEMCP = 936
(This is exactly what changes the non-Unicode code page in the control panel). There should be another parameter that I need to change - and I would prefer to use the Win API call (if available), rather than writing to the registry myself.
I also tried setting HKLM \ SYSTEM \ CurrentControlSet \ Control \ NLS \ Language \ Default = 0804 (Chinese People's Republic of China) to no avail.
I don’t want to change the “locale” as such, as it will also change the time and date settings, delimiters, etc. etc.
This is because I use the ANSI application, which should display Chinese characters, and I am writing a tool to automatically switch the system by showing characters (leaving other aspects of the user interface intact).
Thanks!
Duncan
delphi localization codepages
Duncan
source share