如何在Windows命令行中使用Unicode字符? - How to use unicode characters in Windows command line?

問題:

We have a project in Team Foundation Server (TFS) that has a non-English character (š) in it. 我們在Team Foundation Server(TFS)中有一個項目,其中包含非英語字符(š)。 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. 命令提示符或其他原因將其弄亂了,並且tf.exe實用程序找不到指定的項目。

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. 我已經嘗試過.bat文件的不同格式(ANSI,帶有和不帶有BOM的 UTF-8)以及在JavaScript中編寫腳本的腳本(本質上是Unicode)-但沒有運氣。 How do I execute a program and pass it a Unicode command line? 如何執行程序並將其傳遞給Unicode命令行?


解決方案:

參考一: https://stackoom.com/question/1d3y
參考二: How to use unicode characters in Windows command line?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章