Character encoding
My ASP.NET MVC project has some weird coding behavior.
In my Site.Master there is
<div class="logo">
<a href="<%=Url.Action("Index", "Win7")%>"><%= Html.Encode("Windows 7 Tutoriál") %></a></div>
which is converted to the resulting page as
<div class="logo">
<a href="/">Windows 7 Tutoriál</a></div>
However, in Index.aspx there is
<h1>
Windows 7 Tutoriál</h1>
which translates correctly on the same resulting page. I have
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
like my first line in <head>. Locally, both files are stored in UTF-8 encoding.
Any ideas why this is happening and how to fix it?
Thanks in advance.
+3
1 answer