代码如下:protected string UrlEncode(string url) ...{ byte[] bs = Encoding.GetEncoding(“GB2312”).GetBytes(url); StringBuilder sb = new StringBuilder(); for (int i = 0; i < bs.Length; i++) ...{ if (bs[i] < 128) s