将unicode 转为字符串

public string chn(string source)// convert contents to GB2312
{
return new Regex(@"\u([0-9A-F]{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled).Replace(
source, x => string.Empty + Convert.ToChar(Convert.ToUInt16(x.Result("$1"), 16)));
}

   

原文地址:https://www.cnblogs.com/jchhh912/p/12485981.html