我有一个字符串“我正在使用一些字符串,但 Poacher\u2019s 显示 unicode!”我正在尝试将 Unicode 转换为 ' 字符。
最佳答案
类似的东西应该有效:
string text = "Some string that I am using but Poacher\u2019s shows unicode!";
byte[] textBytes = Encoding.Unicode.GetBytes(text);
Encoding.UTF8.GetString(Encoding.Convert(Encoding.Unicode, Encoding.UTF8, textBytes));
请参阅Encoding MSDN 上的类(class)。
关于c# - 将 unicode 转换为实际字符 C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36611182/