1、ASCII 码
byte[] postBytes = Encoding.ASCII.GetBytes(param);
2、UTF-8 编码
StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8);
3、GB2312编码
Encoding myEncoding = Encoding.GetEncoding("gb2312");
StreamReader reader = new StreamReader(receiveStream, myEncoding);
StreamReader reader = new StreamReader(receiveStream, Encoding.Default);
StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8);
时间: 2024-09-30 17:07:01