QueryString encoding of non-ANSI characters in ASP.Net
I'm passing "Malmö" as a Request.QueryString parameter to a page. However, the code sees it as "Malm�" meaning that s开发者_运维百科tring comparison fails. All globalization settings are set to UTF-8 in web.config. Am I missing something?
Edit: The querystring looks like this http://localhost/PageName/?courseKommun=Malm%F6
%F6
is not the URL encoding for ö, that's why you don't see an ö.
The correct URL encoding would be %C3%B6
(see).
It should work just fine with both versions:
/?courseKommun=Malmö
/?courseKommun=Malm%C3%B6
精彩评论