QueryString encoding non-ANSI characters in ASP.Net

I pass "Malmö" as the Request.QueryString parameter to the page. However, the code sees it as "Malm", which means that string comparisons are not performed. All globalization options are set to UTF-8 in web.config. Did I miss something?

Edit: the request looks like this: http: // localhost / PageName /? CourseKommun = Malm% F6

+3
source share
1 answer

%F6is not a URL encoding for ö , so you do not see ö .
The correct URL encoding will be ( see ). %C3%B6

:

  • /?courseKommun=Malmö
  • /?courseKommun=Malm%C3%B6
0

Source: https://habr.com/ru/post/1747377/


All Articles