asp.net中:
string str = Server.UrlDecode("%D0%BB%D0%BB");

解决方案 »

  1.   

    在你的工程中加入 System.Web 程序集的引用(不是using 而是添加引用System.Web)
    bm_queryKeyWord= HttpUtility.UrlEncode("谢谢",Encoding.GetEncoding("GB2312"));
      

  2.   

    使用 System.Uri.HexEscape( ';')就可以得到
      英文分号;的Unicode值为 '\u003B'
      

  3.   

    string str = Server.UrlEncode("谢谢");
      

  4.   

    我测试过了。 
    aicode是正确的。 popcorn方法我用过,得不到正确的GB2312编码结果的。应该是UTF8的编码吧?请各位指教。Label1.Text = HttpUtility.UrlEncode(TextBox1.Text, Encoding.GetEncoding("GB2312"));
    Label2.Text = HttpUtility.UrlDecode(Label1.Text, Encoding.GetEncoding("GB2312"));//Label1.Text = Server.UrlEncode("谢谢");编码是错误的。