Background
I have a web application that uses ISO-8859-1 . When I pass parameters using Html.ActionLink() , the value is decoded before UTF-8 :
Web.config :
<globalization requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" fileEncoding="iso-8859-1" />
Index.aspx
This is a <%= Html.ActionLink("test", "Read", new { name="Cosméticos" }) %>
generates the following:
This is a <a href="/Intranet/Read?name=Cosm%C3%A9ticos">test</a>
The problem is the value I get in my controller, UTF-8 , not ISO-8859-1 :
TestController :
public ActionResult Read(string name) {
Question
Why is the string not decoded before Cosméticos ?
wmasm source share