converting unicode to actual character C# [duplicate]

岁酱吖の 提交于 2019-12-20 03:17:13

问题


I have a string "Some string that I am using but Poacher\u2019s shows unicode!" I'm trying to have the Unicode convert into the ' character.


回答1:


Something like that should work :

Encoding.UTF8.GetString(Encoding.Convert(Encoding.Unicode, Encoding.UTF8, Encoding.Unicode.GetBytes("Some string that I am using but Poacher\u2019s shows unicode!")));

Please see the Encoding class on MSDN.



来源:https://stackoverflow.com/questions/36611182/converting-unicode-to-actual-character-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!