--- Comment #9 from Andrej Mitrovic <> 2011-05-24 
20:01:07 PDT ---
According to this page
you can get and set the codepage via the
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage] key's OEMCP

Setting the codepage requires a restart though. Also, changing the codepage has
other effects, e.g. using ALT+Numpad keys is handled differently (with codepage
1252 you don't have to prepend a zero when using ALT+Numkey apparently).

Here's how to fetch the value:
import std.stdio;

void main()
    Key HKLM  = Registry.localMachine;
    Key SFW = HKLM.getKey(r"SYSTEM\CurrentControlSet\Control\Nls\CodePage");    

    auto codePage = SFW.getValue("OEMCP").value_SZ();

Note that the key type is REG_SZ, a string, not a binary value. So if you want
to set the code page programmatically, you have to call:
SFW.setValue("OEMCP", "1252");

One more thing, there was this comment:
"Change the code page in your registry and you may not be able to reboot your
windows anymore."

That sounds kind of scary. Perhaps all of this should be left to the user to do
and just document it somewhere in the docs.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to