gpt4 book ai didi

asp.net - *.cshtml 中的 UTF-8

转载 作者:行者123 更新时间:2023-12-05 04:11:16 26 4
gpt4 key购买 nike

我编辑文本,我的英语非常非常...糟糕

嗨!!!

我在 Visual Studio 2017 中遇到 UTF-8 问题。

我使用 Asp.Net Core 1.1,我的 CSHTML 文件中需要 UTF-8。

我发现改变编纂的一些方法正在进行中File->Save As..->In save button, click on the Save with Codification and change to Unicode (UTF-8).

但我每次都需要在每个 cshtml 文件中执行此操作。

我可以将 CSHTML 的默认 Codification 设置为 Unicode(UTF-8)??

谢谢!!

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title> - Teste_db</title>


<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="/css/site.css" />

<body>
...

<h2>View�� </h2>
...
</body>

最佳答案

我解决了我的问题!!!

我从 MVC 中找到了默认的 .cshtml 文件。

文件在 C:\Users\USER_NAME.nuget\packages\Microsoft.VisualStudio.Web.CodeGenerators.Mvc\1.1.0\Templates\ViewGenerator\

我用 notepad++ 编辑了它们,将格式更改为 UTF-8,现在我可以放入特殊的字符,如 çéá...

谢谢!!!

关于asp.net - *.cshtml 中的 UTF-8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42984222/

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