在Windows命令行中的Unicode字符 - 怎么样? [英] Unicode characters in Windows command line - how?
问题描述
我们在TFS中有一个非英文字符(š)的项目。当试图编写一些与构建相关的东西时,我们遇到了一个问题 - 我们不能将š信传递给命令行工具。命令提示符或其他什么不会混乱, tf.exe 实用程序找不到指定的项目。
We have a project in 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. Command prompt or what not else messes it up, and the tf.exe utility can't find the specified project.
不同格式的.bat文件(ANSI,UTF-8有和没有BOM)以及脚本在JavaScript(这是Unicode本质上) - 但没有运气。任何人都有想法如何优秀的程序,并传递 Unicode 命令行?
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. Anybody have an idea how to excecute a program and pass it a Unicode command line?
推荐答案
:
chcp 65001
b $ b
这会将代码页更改为UTF-8。此外,您需要使用Lucida控制台字体。
which will change the code page to UTF-8. Also, you need to use Lucida console fonts.
这篇关于在Windows命令行中的Unicode字符 - 怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!