将unicode转换为实际字符C# [英] converting unicode to actual character C#
本文介绍了将unicode转换为实际字符C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个字符串我正在使用某些字符串,但Poacher\u2019s显示unicode!我正在尝试将Unicode转换为'字符。
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.
推荐答案
类似的东西应该可以工作:
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!")));
请参阅在MSDN上编码类。
这篇关于将unicode转换为实际字符C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文