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 ?
This question was asked at stackoverflow here and here.
Change your code page to UTF-8 with
chcp 65001in your batch file or CMD session.
Start CMD with
CMD /uto 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.
1Hi again, how should I see Persian (Farsi) characters in cmd? chcp 65001 works fine for other languages but not Persian. what should I do? Nov 24, 2014 at 21:07
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
I did this for another reason and it worked for me.