unicode只是给这世界上每个字符规定了一个统一的二进制编号,并没有规定程序该如何去存储和解析。 可以说utf-8是unicode实现方式之一...
在c#中,system.text.encoding.unicode与system.text.encoding.utf8分别是2种编码方式。如果utf-8是unicode的一种实现方式,那c#中为什么将encoding.unicode作为与utf8并列的一种编码方式呢?
windows handles so-called "unicode" strings as utf-16 strings, while most unixes default to utf-8 these days.
原来windows默认的unicode实现是utf-16,所以c#中encoding.unicode就是utf-16。
system.text.encoding.unicode的注释也证明了这一点:


c#中,encoding.unicode = utf-16 。