为什么控制台和调试之间的输出不同?
byte [] data = new byte [] {0xB1, 0x00,0xA6,0x7C, 0x4e, 0xEC, 0xE7, 0xFF, 0xDD, 0xCE};
Console.WriteLine (new String(Encoding.GetEncoding("ISO-8859-1").GetChars(data)));
Console.WriteLine (Encoding.UTF8.GetString(data));
Debug.WriteLine (new String(Encoding.GetEncoding("ISO-8859-1").GetChars(data)));
Debug.WriteLine (new String(Encoding.UTF8.GetChars(data)));
“Console.WriteLine”(Latin1 编码)输出 -> ±¦|NìçÿÝÎ
“Console.WriteLine”(UTF8)输出 -> ��|N�����</p>
“Debug.WriteLine”没有显示输出。