[英]unicode to human readable string c# .net
This is probably a very basic question, but really appreciate if you could help me with this: 这可能是一个非常基本的问题,但是如果您能帮助我,我将非常感谢:
I want to convert an string that contains characters like \ \ \ \\u000\u003c/code> to a human readable string, however I don't want to use .Replace method since the Unicode characters might be much more than what I include the software to check and replace.
我想将包含
\ \ \ \\u000\u003c/code>类的字符的字符串转换为人类可读的字符串,但是我不想使用.Replace方法,因为Unicode字符可能比我包含的软件要多得多检查并更换。
string = "Test \u000d\u000a\u000d\u000aTesting with new line. \u000d\u000a\u000d\u000aone more new line"
I receive this string as a json Object from my server.
我从服务器收到此字符串作为json对象。
Do you even need that? 你甚至需要吗?
For example, the following code will print abc which is the actual decoded value: 例如,以下代码将打印abc ,它是实际的解码值:
var unicodeString = "\u0061\u0062\u0063";
Console.WriteLine(unicodeString);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.