Q:

ASP.Net MVC 2.0 : unescaping URL query parameters

I have following URL:
http://localhost:8041/Reforge.aspx?name=Cyan%ECde&realmId=1
notice %EC in the value of name parameter.
%EC = 236 = ì (igrave)
In my action method:  
public ActionResult Index(string name, int realmId) {...}

name[4] is a character with code 65533 (0xFFFD). What am I doing wrong?

A:

This will depend on the globalization element in web.config:
<globalization requestEncoding="iso-8859-1" />

Or if your site is UTF-8
<globalization requestEncoding="utf-8" />

But in this case the url needs to look like name=Cyan%c3%acde. You should always use URL helpers to generate urls so that they are properly encoded.

