如题

解决方案 »

  1.   

    unicode的编码string s ="\u9519\u8bef\uff1a\u5173\u8054";
    MessageBox.Show(s);
      

  2.   

    private void Page_Load(object sender, System.EventArgs e)
    {
    string s ="\u9519\u8bef\uff1a\u5173\u8054";

    PrintCPBytes(s,932);
    }
    public  void PrintCPBytes(string str, int codePage)
    {
    Encoding targetEncoding;
    byte[] encodedChars;
    // Gets the encoding for the specified code page.
    targetEncoding = Encoding.GetEncoding(codePage); // Gets the byte representation of the specified string.
    encodedChars = targetEncoding.GetBytes(str); // Prints the bytes.
    Response.Write(str);
    }
      

  3.   

    public  void PrintCPBytes(string str, int codePage)
    {
    Encoding targetEncoding;
    byte[] encodedChars;
    // Gets the encoding for the specified code page.
    targetEncoding = Encoding.GetEncoding(codePage);// Gets the byte representation of the specified string.
    encodedChars = targetEncoding.GetBytes(str);// Prints the bytes.
    Response.Write(str);
    }
    你这里的str都没处理嘛,绕了一圈子~~~~~~
    看样子你的基本功也要加强偶~~~