在Visual Studio中显示Unicode [英] Displaying Unicode in visual studio
问题描述
我已经尝试了几乎所有方法来在Visual Studio 2013 C ++中显示Unicode.
I've tried almost anything to display Unicode in Visual Studio 2013, C++.
开始于:
cmd /K chcp 65001
在Visual Studio中更改字符集".
to changing the 'Character Set' in visual studio.
我很乐意得到一些应做的帮助.
I'll be glad to get some help, of what I should do.
推荐答案
要运行UTF-8,您需要一个字节顺序标记(BOM),有时也称为签名.
In order to run UTF-8, you need a Byte Order Mark (BOM) sometimes called a signature.
现在,标识符,宏,字符串和字符文字以及注释中支持Unicode字符.现在还支持通用字符名称.
Unicode characters are now supported in identifiers, macros, string and character literals, and in comments. Universal character names are also now supported.
可以使用以下编码将Unicode输入到源代码文件中:
Unicode can be input into a source code file in the following encodings:
- 具有或不具有字节顺序标记(BOM)的UTF-16小尾数法
- 带或不带BOM的UTF-16大端字节
- 带BOM的UTF-8
出于对所有事物的热爱,请勿将"UTF-8和BOM一起使用!"
For the love of all things decent, do NOT use "UTF-8 with BOM!"
您可以执行此处的操作,然后只需转到以下位置即可保存所需的文件: 高级保存选项"并选择不带BOM的UTF-8". (签名).这仅在逐个文件的基础上起作用,但是讨论了有关安装名为文件修复编码,这将删除所有文件上的BOM.
You can do what was done here and simply save the file you need by going to "Advanced Save Options" and selection "UTF-8 without BOM" (signature). This only works on a file by file basis, but there is a discussion about installing something called File Fix Encoding, which will take off the BOM on ALL files.
换句话说,除非您安装文件修复编码,否则您只能逐个文件显示UTF-8.
In other words -- you can only display UTF-8 on a file-by-file basis unless you install File Fix Encoding.
希望这会有所帮助.
这篇关于在Visual Studio中显示Unicode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!