12

When I open a command line in Windows and type

chcp

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

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

3 Answers 3

6
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="chcp 1251"
4
  • Isn't that more ideal to set that value to a batch file?
    – Adam L. S.
    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
    Feb 2, 2014 at 22:32
  • no such path in windows 10...
    – Niing
    Apr 7, 2020 at 9:49
  • Just try to create this path
    – Maximus
    Apr 10, 2020 at 11:54
6

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

3
  • Marslo, thanks for your answer, but my question was how to set charset to 1251 once, and use it by default May 28, 2013 at 7:21
  • Well, does it works if you modified the value in Regedit?
    – Marslo
    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
    May 28, 2013 at 7:55
0

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 .