Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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):… – J Rao Jan 18 '15 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 output) – eckes Jan 27 '15 at 18:58
Using the UTF-8 code-page also breaks the more command (it gives the misleading error message Not enough memory.) Opening the command-prompt with the /U switch does not help. – Synetech Mar 7 at 22:00
up vote 40 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
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
@galacticninja simply putting chcp 65001 will cause every opened command prompt to print 'Active code page: 65001' whilst @chcp 65001>nul will prevent any output. – Regent Mar 26 '15 at 15:51

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
Note that it will print Active code page: 65001 to stdout. So if you are doing something like CHCP 65001 && mycommand.exe then you'll get the codepage printed out at the start. You need to CHCP 65001 >nul && mycommand.exe – frumbert Jun 12 '15 at 5:33

Reg file

Windows Registry Editor Version 5.00

Command Prompt

REG ADD HKCU\Console /v CodePage /t REG_DWORD /d 0xfde9


sp -t d HKCU:\Console CodePage 0xfde9


regtool set /user/Console/CodePage 0xfde9
share|improve this answer
Doesn't seem to do anything, at least on Windows 10. – imgx64 Jun 7 at 10:18

You must log in to answer this question.

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