C#使用 Server.URLEncode

编码

 

System.Web.HttpUtility.UrlEncode(str,System.Text.Encoding.Unicode);
System.Web.HttpUtility.UrlEncode(str,System.Text.Encoding.UTF8);
System.Web.HttpUtility.UrlEncode(str,System.Text.Encoding.GetEncoding("GB2312")); 

 

解码

System.Web.HttpUtility.UrlDecode(str,System.Text.Encoding.Unicode);
System.Web.HttpUtility.UrlDecode(str,System.Text.Encoding.UTF8);
System.Web.HttpUtility.UrlDecode(str,System.Text.Encoding.GetEncoding("GB2312")); 

 

 

相关文章:

  • 2021-08-14
  • 2021-05-25
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
猜你喜欢
  • 2021-11-16
  • 2022-12-23
  • 2021-07-27
  • 2021-04-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案