20

My command prompt's default code page is 936.

I need to change it to UTF-8.

chcp 65001

The above doesn't work. What's the correct one?

Spiff
  • 101,729
  • 17
  • 175
  • 229

2 Answers2

13

In order for chcp 65001 to work, you must be using a TrueType font in the command prompt. One such font is Lucida Console.

To use Lucida Console:

  • Right click on the window title bar
  • Select Properties
  • Select the tab Font
  • Select Lucida Console
  • Press OK
DavidPostill
  • 153,128
  • 77
  • 353
  • 394
Stephen Jennings
  • 23,171
  • 5
  • 72
  • 107
  • Unfortunately neither Lucida Console, nor Consolas seem to render non-ASCII characters correctly in the command-prompt (which makes me really nervous about handling files with such characters). `:-(` – Synetech Sep 16 '12 at 22:40
  • Oops, nevermind. It renders correctly (Chrome messed up the Unicode characters when it created the `.URL` file). My concern about how files with Unicode characters in their names stands. I worry that performing operations like copy or move would not work or worse, mess things up. I tried using the `chcp` command it complained about being unable to write to the device. I tried it again without the command and it worked. `o.O` – Synetech Sep 16 '12 at 22:58
  • @Synetech don't worry, the display is wrong, the characters are correct. `cd ű` is displayed at `cd ?`, but it still goes into the correct directory. – TWiStErRob Aug 12 '14 at 09:28
0

Many people complain in different questions about the 65001 support in windows console. My particular solution was to use ISO-8859-1 code page (28591) instead of UTF-8. You might take a look at the Code Page Identifiers at MSDN to identify one that fits your character needs.

manuelvigarcia
  • 1,334
  • 2
  • 10
  • 14