??,C# ? UrlEncode
??????? ASCII ?????? System.Web.HttpUtility.UrlEncode
??? URL ????,????????? ASCII ????????(%)????????????,? ASCII ???????????? URL ??????
??????????:
using System; using System.Web.HttpUtility; class Program { static void Main() { string url = "https://www.example.com/???query=????"; string encodedUrl = HttpUtility.UrlEncode(url); Console.WriteLine(encodedUrl); } }
????:
https://www.example.com/测试?query=你好世界
??????,UrlEncode
???? ASCII ?? "??" ? "????" ??? URL ?????