码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2015-01-29 19:24:06      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:

转转地址: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对应的中文)"

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

标签:

原文地址:http://www.cnblogs.com/yxlblogs/p/4260659.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!