Windows CMD permanently sets UTF-8 encoding

Time:2021-7-30

CMD setting UTF-8

Temporary modification

  1. It only works on the current window. Enter the CMD command window first (shortcut key: win key + R)
  2. Directly enter “CHCP 65001” and press enter to execute. At this time, the window code is already UTF-8 code.

Permanent modification

  1. Press Win + R, enter regedit and confirm

Windows CMD permanently sets UTF-8 encoding

  1. Find HKEY in order_ LOCAL_ MACHINE\SOFTWARE\Microsoft\Command Processor

Windows CMD permanently sets UTF-8 encoding

  1. Right click – new and select “string value”

Windows CMD permanently sets UTF-8 encoding

  1. Name it “autorun”, right-click to modify, fill in “CHCP 65001” for numerical data, and click OK

Windows CMD permanently sets UTF-8 encoding

  1. At this time, open the CMD command window and you will see that, like the previously temporarily modified window, the code has been modified to UTF-8, and each time you open CMD, it is UTF-8.

Windows CMD permanently sets UTF-8 encoding