How can I make dir command in cmd.exe to behave as though it were under a different Locale?

0

1

When I change my System Locale to a Simplified Chinese (PRC), and I open cmd.exe, a dir command will display the Chinese character file names correctly.

If my System Locale is English (United States), a dir will screw up the Chinese characters.

How can I make the dir display Chinese characters correctly under the English locale?

I've looked at related questions to displaying Chinese characters in cmd.exe but none of them make note of the fact that it works perfectly fine the Simplified Chinese locale.

merlin2011

Posted 2013-04-18T06:09:57.397

Reputation: 1 409

1Does the chcp 65001 command help? – Karan – 2013-04-18T21:29:07.627

Not really. It changes the code pages without changing the available fonts. I've also tried various hacks for changing the fonts directly but those did not pan out either. – merlin2011 – 2013-04-18T22:03:33.733

In addition to the chcp command try setting Lucida Console as the font for the command prompt window from its properties. – Karan – 2013-04-18T22:16:11.950

Thanks, but I have tried that combination as well, and the Chinese characters in the file names still come out as boxes when I run the dir command. I think it is not just specific to cmd.exe but specific to the command dir itself, and its behavior under different locales. – merlin2011 – 2013-04-18T22:23:36.563

Answers

1

I have 2 folders (One in Chinese, One in Japanese):

  • 你好
  • こんにちは

In Command Prompt, when displaying the folder using dir, the font become question mark with box. To the system, it is still the correct characters.

Click here to see the folder displayed in Consolas font

But, if you were to display the font in NSimSun font or SimSun-ExtB, it can display correctly.

See here on NSimSun font and SimSun-ExtB

You can change the font at the Command Prompt Properties by Right-Click the App Bar.

I am using Windows 10 with AU, but I believe the previous version of Windows should work if you just change the font.

Melicaster He Kar Ping

Posted 2013-04-18T06:09:57.397

Reputation: 11