I just want to get "city" value to a string variable.
But
http://localhost:4928/Default.aspx?method=abc&city=ĞÜŞİÇÖöçşğü
When I type above link to chrome, there is no any problem. But when I type this link to the IE, it gives me city value as G�SI����sg�
开发者_StackOverflowI used
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="tr-TR" uiCulture="tr-TR" />
and
<%@ Page Language="cs" codepage="65001" AutoEventWireup="false"CodeBehind="Default.aspx.cs" Inherits="getResultFromWS._Default"%>
And I tried a few way to get correct value of "City"
StrToEncode = HttpContext.Current.Request.Url.AbsoluteUri;
StrToReturn = HttpUtility.UrlEncode(Request.Item("city"),System.Text.UTF8Encoding.GetEncoding("utf-8"))
...
How can I get Correct value(ĞÜŞİÇÖöçşğü) of city?It should be UTF-8!
Thx for helping.
Have you tried setting the content-type via a meta tag?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
精彩评论