We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a successor of #11530.
All .cshtml and .razor files have UTF-8 encoding with BOM. All .cs files have no BOM. This in combination with Visual Studio results in files being saved in ANSII (or system code page) encoding.
.cshtml
.razor
.cs
We've hit this problem when adding an error to the ModelState in the code behind file:
ModelState
ModelState.AddModelError(string.Empty, "This is an error with än umlaut.");
Visual Studio will not save this with UTF-8 encoding and this will break the error message in the browser.
To work around the Visual Studio behaviour, all templates files should be in UTF-8 encoding with BOM.
dotnet new page --name Umlaut --namespace YourApp.Pages --output Pages
ModelState.AddModelError(String.Empty, "Än Umlaut");
dotnet build -c release
�
a minimal repro is available at unicorn-development/aspnetcore57679
No response
8.0
The text was updated successfully, but these errors were encountered:
dotnet/roslyn#11932 may explain, why it only breaks when compiling on linux.
In our scenario we are developing on windows, but running the build in Azure DevOps on ubuntu because it's way faster during the restore.
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
Describe the bug
This is a successor of #11530.
All
.cshtml
and.razor
files have UTF-8 encoding with BOM. All.cs
files have no BOM. This in combination with Visual Studio results in files being saved in ANSII (or system code page) encoding.We've hit this problem when adding an error to the
ModelState
in the code behind file:Visual Studio will not save this with UTF-8 encoding and this will break the error message in the browser.
Expected Behavior
To work around the Visual Studio behaviour, all templates files should be in UTF-8 encoding with BOM.
Steps To Reproduce
dotnet new page --name Umlaut --namespace YourApp.Pages --output Pages
)ModelState.AddModelError(String.Empty, "Än Umlaut");
)dotnet build -c release
�
which will be rendered in the markupa minimal repro is available at unicorn-development/aspnetcore57679
Exceptions (if any)
No response
.NET Version
8.0
Anything else?
No response
The text was updated successfully, but these errors were encountered: