如何在Visual Studio中设置标准编码 [英] How to set standard encoding in Visual Studio

查看:1165
本文介绍了如何在Visual Studio中设置标准编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方式来设置Visual Studio,所以它总是以UTF-8保存我的文件。

I am searching for a way to setup Visual Studio so it always saves my files in UTF-8.

我只找到了选项来设置这个项目宽有一种方法可以设置它Visual Studio宽?

I have only found options to set this project wide is there a way to set it Visual Studio wide?

推荐答案

您希望文件保存为UTF-8,将在ASCII编码中丢失的特殊字符?如果是这样,那么在 Tools>中有一个VS2008全局设置。选项>环境>文档,命名为当数据无法保存在代码页中时,将文档另存为Unicode。启用此项后,如果某些字符无法在其他默认代码页中显示,VS2008将保存为Unicode。

Do you want the files to save as UTF-8 because you are using special characters that would be lost in ASCII encoding? If that's the case, then there is a VS2008 global setting in Tools > Options > Environment > Documents, named Save documents as Unicode when data cannot be saved in codepage. When this is enabled, VS2008 will save as Unicode if certain characters cannot be represented in the otherwise-default codepage.

此外,哪些文件不是保存为UTF-8?默认情况下,所有的.cs,.csproj,.sln,.config,.as * x等都保存为UTF-8(带签名,字节顺序标记)。

Also, which files are not being saved as UTF-8? All of my .cs, .csproj, .sln, .config, .as*x, etc, all save as UTF-8 (with signature, the byte order marks), by default.

这篇关于如何在Visual Studio中设置标准编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆