public string UnicodeToStr(string unicodeStr) { string outStr = ""; if (!string.IsNullOrEmpty(unicodeStr)) { string[] strlist = unicodeStr.Replace("&#", "").Replace(";", "").Split('x'); try { for (int i = 1; i < strlist.Length; i++) { outStr += (char)int.Parse(strlist[i], System.Globalization.NumberStyles.HexNumber); } } catch (FormatException ex) { outStr = ex.Message; } } return outStr; }
//调用 UnicodeToStr("")
标签:unicodeStr,string,c#,前端,iconfont,int,outStr,strlist From: https://www.cnblogs.com/1014040868lyn/p/17464650.html