I have a query string with a parameter value that contains the norwegian character å
encoded as %e5
. The page contains a form with an action attribute which is automatically filled by ASP.Net. When the URL is output into said attribute it is printed with a full two byte encoding: %u00e5
.
When posting back this seems to be ok when debugging the code behind. However the page actually does a redirect to itself (for some other reason) and the redirect location header looks like this: Location: /myFolder/MyPage.aspx?Param1=%C3%A5
So the %e5
has been translated to %C3%A5
which breaks the output somehow.
In HTML text the broken characters look like å
after having been output via HttpUtility.HtmlEncode.
The entire web application is ISO8859-1 encoded.
PS. When removing the u00 from the output %u00e5
in the action attribute before posting the form, everything is output nicely. But the error seems to be the translation from %e5
to %C3%A5
. (And of course the self redirect, but that's another matter.)
Any pointers?