gpt4 book ai didi

character-encoding - 按文件或扩展名更改编码

转载 作者:行者123 更新时间:2023-12-03 13:56:25 28 4
gpt4 key购买 nike

我正在使用Microsoft Visual Studio Express 2012 for Web。似乎我打开的每个文件都被编码为UTF-8。对于大多数将要面向Web的文件,这很好。但是,我的项目中有一些专门用于构建的文件(例如.bat文件),必须使用ANSI编码。

VS中是否有任何配置设置可以基于每个文件或每个扩展名指定编码?或者,如果未指定编码,至少要禁用自动转换为UTF-8的功能?

最佳答案

在Visual Studio中打开有问题的文件,然后...


File菜单上,单击Advanced Save Options
Encoding下拉列表中,选择Unicode (UTF-8 …或所需的编码。
单击OK


另请参阅:
how to change source file encoding in csharp project (visual studio / msbuild machine)?

关于character-encoding - 按文件或扩展名更改编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12276757/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com