Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to set permantly in DOS the codepage.

chcp 1252

How can I store the result of that command?

share|improve this question

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"
share|improve this answer
On my German win7 system the default code page was 850. – Christian Dec 21 '12 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 '12 at 16:40

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.

share|improve this answer

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 make effect.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .