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 that is automatically populated by ASP.Net. When the URL is output to the specified attribute, it prints with full double-byte encoding: %u00e5 .
When sending back, this looks fine when debugging code. However, the page actually redirects to itself (for some other reason), and the redirect location header looks like this: Location: /myFolder/MyPage.aspx?Param1=%C3%A5
So, %e5 was transferred to %C3%A5 , which somehow breaks the exit.
In HTML text, broken characters look like å after output via HttpUtility.HtmlEncode.
The entire web application is encoded by ISO8859-1.
PS. When you delete u00 from the output %u00e5 in the action attribute before submitting the form, everything is displayed beautifully. But the error, apparently, is a translation from %e5 to %C3%A5 . (And, of course, a self-regulator, but that's another matter.)
Any pointers?
source share