CMD: How to use non-English characters?

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

2 Answers

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

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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like