When I open a command line in Windows and type


I get result Текущая кодовая страница: 866

How do I set the charset to chcp 1251 by default?

3 Answers 3

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="chcp 1251"
  • Isn't that more ideal to set that value to a batch file?
    – Adam L. S.
    Commented Feb 2, 2014 at 18:50
  • Not. You need to modify ALL batch files you may run. And they can be third-party and "read-only".
    – Maximus
    Commented Feb 2, 2014 at 22:32
  • no such path in windows 10...
    – Niing
    Commented Apr 7, 2020 at 9:49
  • Just try to create this path
    – Maximus
    Commented Apr 10, 2020 at 11:54

You also can run command in command line:

chcp 1251

After that, you can check the change from the screenshot below: enter image description here

  • Marslo, thanks for your answer, but my question was how to set charset to 1251 once, and use it by default Commented May 28, 2013 at 7:21
  • Well, does it works if you modified the value in Regedit?
    – Marslo
    Commented May 28, 2013 at 7:49
  • And, you can check the changed effect from the screenshot. And, of cause you should run this command as Administrator if the os is win7.
    – Marslo
    Commented May 28, 2013 at 7:55

From CMD:

REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v "AutoRun" /d "chcp 1251" /f

Next time you run cmd, type chcp to confirm new charset.

Tested in Win 10 cmd

You must log in to answer this question.

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