62,254
社区成员
发帖
与我相关
我的任务
分享
HttpResponse response = context.Response;
response.Charset = "GB2312";
response.ContentEncoding = System.Text.Encoding.UTF8;
response.Write(HttpUtility.UrlEncode("中文中文"));
response.Write(HttpContext.Current.Server.HtmlDecode("中文中文"));
$.ajax({
type: "GET",
// contentType: "text/html",
// dataType: "html",
url: "ClientFile/Handler.ashx",
data: "word=" + $("#TextBox1").val() + "&" + new Date().toLocaleTimeString(),
success: function(msg) {
alert(escape(msg));
alert(unescape(msg)); }
});
<globalization requestEncoding="gb2312" responseEncoding="gb2312" />
Response.Write(HttpUtility.UrlEncode("中文中文"));
Response.Write(HttpUtility.UrlDecode("中文中文"));