Change CodePage in CMD permanently?

后端 未结 6 1034
我在风中等你
我在风中等你 2020-12-05 12:07

My Windows cmd CodePage is now under 65001. Since I was doing some Android stuff and need to use console log, but forget how changing it now.

When using chcp 437 to

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-05 12:20

    Setting the default CMD/shell Codepage can be neatly done using the following command:

    REG ADD HKCU\Console\%SystemRoot^%_system32_cmd.exe /v CodePage /t REG_DWORD /d 437
    

    This will make the codepage 437 your default, but ONLY in the cmd/shell, meaning the rest of the OS is safe and the boot environment ist untouched. Instead of always changing the codepage whenever the cmd opens, the cmd will open in the specified codepage from start.

    If you wish to edit it manually using regedit.exe, beware that you have to set the codepage value in 'decimal' (use the radio-buttons for selecting decimal or hex input).

提交回复
热议问题