一个asp.net的网页,编码是gb2312 , 表单用 method="get"
需要判断参数UrlEncode所用的编码,ASP提交的用GB2312,.NET提交的用默认的UTF-8
System.Collections.Specialized.NameValueCollection nv =
System.Web.HttpUtility.ParseQueryString(Request.Url.Query, System.Text.Encoding.GetEncoding("GB2312"));
Response.Write(nv["q"]);
时间: 2024-11-03 05:56:40