Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
大家好,我收到来自服务器的 json 响应,其中包含以下文本:
<div class=\"profile-info\">\u0413\u043e\u0440\u043e\u0434: \u041a\u043e\u0432\u0440\u043e\u0432<\/div>
如何解码\u0413\u043e\u0440\u043e\u0434: \u041a\u043e\u0432\u0440\u043e\u0432?
\u0413\u043e\u0440\u043e\u0434: \u041a\u043e\u0432\u0440\u043e\u0432
Regex regex = new Regex(@"\\u([a-f0-9]{4})", RegexOptions.IgnoreCase); String result = regex.Replace(result, match => ((Char)Int32.Parse(match.Value.Substring(2), NumberStyles.HexNumber)).ToString());