C# 汉字Unicode编码转汉字

u9a8cu8bc1u5931u8d25uff0cu8bf7u6309u7167u5408u89c4u7684u65b9u5f0fu8fdbu884cu63d0u4ea4

这样的就是汉字的unicode编码了。。

转换函数:

        public static string unicodetogb(string text)
        {
            System.Text.RegularExpressions.MatchCollection mc = System.Text.RegularExpressions.Regex.Matches(text, "\\u([\w]{4})");
            string a = text.Replace("\u", "");
            char[] arr = new char[mc.Count];
            for (int i = 0; i < arr.Length; i++)
            {
                arr[i] = (char)Convert.ToInt32(a.Substring(i * 4, 4), 16);
            }
            string c = new string(arr);
            return c;
        }

原文地址:https://www.cnblogs.com/cyberarmy/p/3204398.html