UTF-16 on cmd.exe

后端 未结 2 1111
小鲜肉
小鲜肉 2020-11-28 13:05

I\'ve created the directory \"•◘▬¨ŤlCęół♥☺☻0\" and I would like to make it visible with dir /b command. So far, chcp 10000, chcp 10001 and chcp 65000(utf-8) commands failed(

相关标签:
2条回答
  • 2020-11-28 13:20

    Yeah,I've just resolved my problem. It was a fault of default font in cmd.exe which can't manage unicode signs. To fix it(windows 7 x64 pro):

    1. Open/run cmd.exe
    2. Click on the icon at the top-left corner
    3. Select properties
    4. Then "Font" bar
    5. Select "Lucida Console" and OK.
    6. Write Chcp 10000 at the prompt
    7. Finally dir /b

    Enjoy your clean UTF-16 output with hearts, Chinese signs, and much more!

    0 讨论(0)
  • 2020-11-28 13:44

    Also from Is there a Windows command shell that will display Unicode characters?

    CHCP 65001
    DIR > UTF8.TXT
    TYPE UTF8.TXT
    
    0 讨论(0)
提交回复
热议问题