是英文的可以看清楚,中文出现乱码
a.MessageBuffer 是接收到的信息
System.IO.StreamWriter zfs=new StreamWriter("e:\\"+textBox1.Text+".log",true,System.Text.Encoding.Default);char[] download = Encoding.GetEncoding("gb2312").GetString(a.MessageBuffer).ToCharArray();zfs.Write((char[])download,0,Convert.ToInt32(args.MessageLength));zfs.Close();
a.MessageBuffer 是接收到的信息
System.IO.StreamWriter zfs=new StreamWriter("e:\\"+textBox1.Text+".log",true,System.Text.Encoding.Default);char[] download = Encoding.GetEncoding("gb2312").GetString(a.MessageBuffer).ToCharArray();zfs.Write((char[])download,0,Convert.ToInt32(args.MessageLength));zfs.Close();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货