1,byte[] jsonBytes = Encoding.UTF8.GetBytes(json);
2, byte[] jsonBytes = Encoding.GetEncoding("iso-8859-1").GetBytes(json);
Base64编码解码示例:https://www.cnblogs.com/dxqs/p/4670539.html
===================================================================
iso88591和utf-8编码是为了语言的需要
iso88591:英文;
utf-8:中文;
url编码:将一些http请求中不支持的特殊字符转换成支持的字符组合
base64编码:是网络上最常见的用于传输8Bit字节码的编码方式之一
=======================================================================
string name = "张";
byte[] byteArray = System.Text.Encoding.Default.GetBytes(name);
byte[] byteArray1 = System.Text.Encoding.UTF8.GetBytes(name);
byte[] byteArray2 = System.Text.Encoding.Unicode.GetBytes(name);
byte[] byteArray3 = Encoding.GetEncoding("iso-8859-1").GetBytes(name);
byte[] byteArray4 = Encoding.GetEncoding("gb2312").GetBytes(name);
After testing local default encoding is gb2312;