开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜