I would like to set permantly in DOS the codepage.

chcp 1252

How can I store the result of that command?


4 Answers 4


Open the registry editor (regedit) and navigate to the following key:


Edit the OEMCP value on the right and change it from the default (861?) to 1252.

Now open a new command-prompt and type chcp to see the current codepage. (It may—probably?—will not take until you reboot.)

Another way you can do it is to add the chcp command to the Autorun key (you can set it for either a specific user or the whole system):


; Auto–code-page.reg
; Have chcp automatically run whenever a command-prompt is opened

;For current user
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"Autorun"="chcp 1252"

;For all users
;[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]
;"Autorun"="chcp 1252"
  • On my German win7 system the default code page was 850.
    – Christian
    Dec 21, 2012 at 14:43
  • @Christian, yes, it will vary depending on the Windows language used. However, with nothing more to go on than the OP’s name, I suspect they are most likely using code-page 861 by default.
    – Synetech
    Dec 21, 2012 at 16:40

Open Control Panel. Choose Clock, Language and Region:

enter image description here

Then Change keyboard or other input methods:

enter image description here

Switch to the Administrative tab:

enter image description here

Click Change system locale under Language for non-Unicode programs and choose the desired language.

But yes, it changes:


and maybe other things.

Speaking of which, that's probably why changing OEMCP to 65001 made the system unbootable. There's no such option in Control Panel.

(Screenshots taken from here as I don't have Windows with an English language pack at hand to make screenshots.)


Changing the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage makes my system unable to boot.

Adding a string value in HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor of

"Autorun"="chcp 1252"

solved the problem.


I'm a user of Russian-localized Windows 7 x64 and so I need to set Code Page 1251 (Windows Cyrillic) as the default for CMD. The solution by Synetech as well as the solution by Steven Penny do work but with the latter only CMD will be affected and so for example the ping utility will work incorrectly, so I decided to apply them both. At the same time changing default Code Page isn't sufficient: the default font of the CMD window does not support this encoding and I'm forced to set the Lucida Console font as the default. The following .REG file does the whole work (changing the default codepage to 1251 and also setting Lucida Console as the default font for CMD with proper properties):

Windows Registry Editor Version 5.00



; Code Page 1251
; Default font for CMD window is "Lucida Console"
"FaceName"="Lucida Console"

After importing this .REG file into the registry (by double-clicking on the file and choosing "Yes") you must reboot the system for the changes to take effect.

Not the answer you're looking for? Browse other questions tagged or ask your own question.