%B2%E9%D1%AF%BD%E1%B9%FB = 查询结果

解决方案 »

  1.   

    //先要引用vb.runtime.byte[] b={'a','b','c'};

    b=Encoding.GetEncoding("GB2312").GetBytes(b);String s=Microsoft.Visual.Strings.StrConv(b,Microsoft.VisualBasic.VbStrConv.SimlifiedChinese,0);
      

  2.   


    byte[] hz = new bytes[8] { 0xB2,0xE9,0xD1,0xAF,0xBD,0xE1,0xB9,0xFB };
    string s = System.Text.Encoding.Default.GetString(hz);
      

  3.   

    需要将 %B2%E9%D1%AF%BD%E1%B9%FB 转换成 '查询结果'
      

  4.   

    string source="%B2%E9%D1%AF%BD%E1%B9%FB"string result=GetResult(source);private string GetResult(s){
    //这里该怎么写?
    }
      

  5.   

    楼主太懒了……算了我写一下,为了方便我把原字符串里面第一个%去掉了 private string GetResult(string s)
    {
    string[] Test=s.Split('%'); byte[] hz=new byte[Test.Length]; for(int i=0;i<Test.Length;i++)
    {
                    int tmp=Convert.ToInt32(Test[i],16);
    hz[i]=(byte)tmp;
    } string myR = System.Text.Encoding.Default.GetString(hz); return myR;

    } private void button6_Click(object sender, System.EventArgs e)
    {
    string source="B2%E9%D1%AF%BD%E1%B9%FB"; string result=GetResult(source);

    MessageBox.Show(result);

    }