c#将http调用返回额json中的有关中文的unicode转换为中文(转)

转转地址:http://www.cnblogs.com/promise-7/archive/2012/11/05/2755515.html

中文转Unicode:HttpUtility.UrlEncodeUnicode(string str);
转换后中文格式:"%uxxxx"  举例:"柳_abc123"  转换结果是:"%u67f3_abc123"

Unicode转中文1:HttpUtility.UrlDecode(string str);
str格式:"%uxxxx" ,举例:"%u67f3_abc123"

Unicode转中文2:Regex.Unescape(string str);
str格式:"sdfasdf\uxxxx" ,举例:"sdfasdf(\uxxxx对应的中文)"

posted @ 2017-05-03 11:10  zagelover  阅读(4160)  评论(0编辑  收藏  举报