3
byte[] newBytes = new Byte[] { 169 };
string string1 = System.Text.Encoding.UTF8.GetString(newBytes, 0, newBytes.Length);
在上面的程序中,我期望string1具有版權符號©的值。爲什麼我的c#代碼不能識別版權符號?
,但我得到一些其他的值(可能是一些垃圾),如下圖所示
我有什麼錯?
參見:http://stackoverflow.com/questions/644785/is-it-possible-to-get-a-copyright- symbol-in-c-sharp-console-application –
錯誤的編碼,即不是utf-8。 Encoding.Default或Encoding.GetEncoding(1252)有工作的可能性。 –