C# 转换字符串形式的” \\u1234 “ 为 “ \u1234” 的unicode编码
string sIn = "\\u4fc4\\u7f57\\u65af\\u536b\\u56fd\\u6218\\u4e89\\u9898\\u6750MV\\u300a\\u6700\\u7231";//转换前
string sOut = "";//转换后
string[] arr = sIn.Split(new string[] { "\\u" }, StringSplitOptions.RemoveEmptyEntries);
foreach (string s in arr)
{
sOut += (char)Convert.ToInt32(s.Substring(0, 4), 16) + s.Substring(4);
}
posted on 2012-12-14 22:40 Jason_liu 阅读(4123) 评论(0) 编辑 收藏 举报