当前位置:Gxlcms > asp.net > asp.net下百度的编码和解码

asp.net下百度的编码和解码

时间:2021-07-01 10:21:17 帮助过:36人阅读

百度的编码:
str = System.Web.HttpUtility.UrlEncode("中文", System.Text.UnicodeEncoding.GetEncoding("GB2312")).ToUpper()

解码
System.Web.HttpUtility.UrlDecode("%C3%CF%CF%DC%BB%E1", System.Text.UnicodeEncoding.GetEncoding("GB2312"))



string a = System.Web.HttpUtility.UrlEncode("孟宪会", System.Text.UnicodeEncoding.GetEncoding("GB2312")).ToUpper();
Response.Write(a);
Response.Write(System.Web.HttpUtility.UrlDecode("%C3%CF%CF%DC%BB%E1", System.Text.UnicodeEncoding.GetEncoding("GB2312")));

人气教程排行