How to code in \ decode from a UTF-8 string in WPF?

So, I have a line, sort of Русское Имяlike representing it as a real line with wcf textBox? And how to encode, for example, a string entered in textInput in UTF-8?

+3
source share
1 answer

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

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

It is decoded before . As for UTF-8, then as bwreichle said, you can use:

Encoding.UTF8.GetBytes(@" ")
+2
source

Source: https://habr.com/ru/post/1744577/


All Articles