Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Currently I'm running Windows 7 x64 and usually I want all console tools to work with UTF-8 rather than with default code page 850.

Running chcp 65001 in the command prompt prior to use of any tools helps but is there any way to set is as default code page?


Changing HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\OEMCP value to 65001 appear to make the system unable to boot in my case.

Proposed change of HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\Autorun to @chcp 65001>nul served just well for my purpose. (thanks to Ole_Brun)

share|improve this question
Note the purposed solution could break Windows' find.exe (which would cause problems with Android SDK build): superuser.com/questions/176737/… –  user3643497 Jan 18 at 5:24
Hm, when I use chcp 65001 my console windows crash when I do dir, but it helps to simply start cmd.exe with the /u flag (nb: it does use unicode by it is not reflected in chcp.com output) –  eckes Jan 27 at 18:58

2 Answers 2

up vote 22 down vote accepted

To change the codepage for the console only, do the following:

  1. Start -> Run -> regedit
  2. Go to [HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\Autorun]
  3. Change the value to chcp 65001
share|improve this answer
The SO question you referenced doesn't appear to have anything about how to set any code page as default. –  Regent Apr 12 '11 at 12:35
Be aware that changing the codepage will not only affect the console though. To make it only apply to the console, you could put chcp 65001 into the HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\Autorun. –  Nils Magne Lunde Apr 12 '11 at 12:54
Surprisingly changing the OEMCP registry setting made my system unable to boot so I had to use system recovery to restore to working state. Autorun did the trick, however. –  Regent Apr 12 '11 at 13:35
@Regent: If this solution makes your system unbootable, why did you mark it as accepted, then? –  Tim Pietzcker Sep 19 '12 at 14:25
Then you or Ole should edit the answer to correct it. If someone doesn't read the fine print, he will get burned badly by this answer. –  Tim Pietzcker Sep 20 '12 at 15:34

I don't like change the system. This creates a lot of problems for me. I created a batch file:

REM change CHCP to UTF-8
CHCP 65001

I saved at C:\Windows\System32 as switch.bat.

I created a link for cmd.exe on the Desktop.

In the properties of cmd, changed the destination to: C:\Windows\System32\cmd.exe /k switch

Voilá, when I need to type in UTF-8, I use this link.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.