开发者

How to encode into\decode from UTF-8 string in WPF?

So I have a string like Русское Имя how to represent it as real string with wcf textBox? And How to encode for example russian string inputed into textInput into UTF-8开发者_JAVA技巧?


To decode this and other HTML encoded strings, use HtmlDecode() like below:

System.Web.HttpUtility.HtmlDecode("Русское Имя")

This decodes to Русское Имя. As for UTF-8, just like bwreichle said, you can use:

Encoding.UTF8.GetBytes(@"Русское Имя")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜