/ Published in: C#

Convert "\u6211" to "我"
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static string UnicodeToCharacter(string inStr) { string result = inStr; if (Regex.Match(inStr, @".*\\u.*").Success) { result = rx.Replace(result, delegate(Match match) { return ((char)Int32.Parse(match.Value.Substring(2), NumberStyles.HexNumber)).ToString(); }); } return result; }
Comments
