今天做需求,C#中用到了URL中的UFF-8编码和解码记录下:
//utf-8编码
/string reqmsgutf = System.Web.HttpUtility.UrlEncode(reqmsg,System.Text.Encoding.UTF8);
//UTF-8解码
string respmsg = System.Web.HttpUtility.UrlDecode(respmsgutf,System.Text.Encoding.UTF8);
今天做需求,C#中用到了URL中的UFF-8编码和解码记录下:
//utf-8编码
/string reqmsgutf = System.Web.HttpUtility.UrlEncode(reqmsg,System.Text.Encoding.UTF8);
//UTF-8解码
string respmsg = System.Web.HttpUtility.UrlDecode(respmsgutf,System.Text.Encoding.UTF8);