I’m using the MVC startup template and added mvcscaffolding. Everything worked fine, when all of a sudden some views started displaying swedish characters wrong. For example:
The file – Edit.cshtml – consists of:
@model TestApp.Models.TestViewModel
<h3>Å Ä Ö</h3>
@Html.Partial("_CreateOrEdit", Model)
The partial file – _CreateOrEdit.cshtml – only consists of:
@model TestApp.Models.TestViewModel
<h3>Å Ä Ö</h3>
The result is:
Å Ä Ö
Ã… Ä Ã
I have no idea even where to begin. The _Layout.cshtml contains only the standard (HTML 5) template (with meta charset=”utf-8″) , no changes.
One thing you can check:
Go into
File->Advanced Save Optionsfor the_CreateOrEdit.cshtmlfile, and double check that it has the same encoding as theEdit.cshtmlfile.