Change keyboard codepage

14 March 2002 by Snakefoot | Comment » | Trackback Off
If you have problems using the keyboard in programs run from the command line (cmd.exe), then you might need to change your codepage, so it fits with your national settings.

This is can be done with this STRING value in the registry:

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Control \Nls \Codepage]
OEMCP = "850" (Default = 437)

One can also change the codepage from the command prompt (Will only have effect for the current session):

mode con cp select=850

To see current codepage from the command prompt:

mode con

CountryCodepage
United States, UK437
Multilingual 850
Slavic 852
Portuguese 860
Icelandic 861
Canadian, French 863
Scandinavian/Nordic865
Note it is possible for an application to change the codepage by using the setLocale function. There is also SetConsoleCP / SetConsoleOutputCP, but they don't work with the default raster font, but requires that the console is using a truetype font like Lucida Console. More Info MS KB Q99795.

More Info MS KB Q314010

Updated: 22 August 2007

Leave a comment


NB! Use the Forum for computer help and off-topic questions.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>