问题二:
  你用Unicode编码就没有问题了:
  string s = "欢迎wdr";
  byte[] byte_Buffer = Encoding.Unicode.GetBytes(strMessage.ToCharArray());
  s = Encoding .Unicode.GetString(byte_Buffer).Split(new char[]{'|'});

解决方案 »

  1.   


    问题1:
    每个字符串变量后面都会自动加上null,
    str_Send和s在接收时遇到null时就停止了。问题2:
    用System.Text.Encoding就行了吧。
      

  2.   

    //一段测试代码
    string strTest = "welocome欢迎光临";
    byte[] byte_Buffer = Encoding.Unicode.GetBytes(strTest);
    string str1 = Encoding.ASCII.GetString(byte_Buffer);   
            //str1值为 "w"
    string str2 = Encoding.Unicode.GetString(byte_Buffer);
            //str2值为 "welocome欢迎光临"
    //所以第二个问题已经解决,可以给50分,但第一个问题是什么原因呢,
    //哪位大虾帮帮。
      

  3.   

    把"加入吴聊室\r\n"压入到msg_Receive.str_Name_Source试看看,,如果不行的话,就是msg_Receive.str_Name_Source有问题咯
      

  4.   

    我看了一下,没有什么不可见字符,s和msg_Receive.str_Name_Source的长度均为3,没什么特别奇怪的地方。