9

I want to work with non-English File names in CMD (Command Line) like creating Folder with the names or deleting several files that names are non-English. How can i work with this names ?

0
7

This question was asked at stackoverflow here and here.

Summary

  • Change your code page to UTF-8 with chcp 65001 in your batch file or CMD session.
    enter image description here

  • Start CMD with CMD /u to cause CMD to redirect to files in UTF-16, Little Endian.
    Windows distinguishes between showed up text and redirected text to a file.

  • For viewing Unicode characters in a CMD Window you need to use Lucida Console or Consolas as font instead of Raster Font. Or else some unicode characters are showed up garbled.
    enter image description here

1
  • 1
    Hi again, how should I see Persian (Farsi) characters in cmd? chcp 65001 works fine for other languages but not Persian. what should I do? – Amirreza Nasiri Nov 24 '14 at 21:07
0

I would try chcp 1256 for Arabic ANSI. It won't render proper characters, because Windows 1256 is not part of WGL4 which is supported by Lucida Console, but it could actually work, e.g. create proper filenames etc.

If you need to display the characters you need to find supported font first. This is long shot, but you can convert Unifont to monospace font with this python script. When you install the altered font, it will show up in the font list of cmd.exe. Try it with chcp 65001.

I did this for another reason and it worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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