How to use unicode characters in Windows command line

command-lineinputunicodewindows-console

We have a project in Team Foundation Server (TFS) that has a non-English character (š) in it. When trying to script a few build-related things we've stumbled upon a problem – we can't pass the š letter to the command-line tools. The command prompt or what not else messes it up, and the tf.exe utility can't find the specified project.

I've tried different formats for the .bat file (ANSI, UTF-8 with and without BOM) as well as scripting it in JavaScript (which is Unicode inherently) – but no luck. How do I execute a program and pass it a Unicode command line?

Best Solution

Try:

chcp 65001

which will change the code page to UTF-8. Also, you need to use Lucida console fonts.