编码转换问题

yzy8788 2011-04-28 09:10:43
kd_callback("", "1",[{"time":"2011-4-28 8:36:39","context":"\u6c5f\u82cf\u5357\u4eac\u5e02\u4ed9\u6797\u533a\u4e00\u90e8\/\u4e0b\u8f66\u626b\u63cf"},{"time":"2011-4-28 7:22:21","context":"\u6c5f\u82cf\u5357\u4eac\u5e02\/\u4e0a\u8f66\u626b\u63cf"},{"time":"2011-4-27 22:14:57","context":"\u676d\u5dde\u5206\u62e8\u4e2d\u5fc3\/\u5efa\u5305\u626b\u63cf"},{"time":"2011-4-27 22:04:25","context":"\u676d\u5dde\u5206\u62e8\u4e2d\u5fc3\/\u4e0b\u8f66\u626b\u63cf"},{"time":"2011-4-27 20:43:02","context":"\u6d59\u6c5f\u676d\u5dde\u5e02\u4e0b\u6c99\/\u5feb\u4ef6\u63fd\u6536\u626b\u63cf"}])

像这样一个字符串,如何把里面的\u开头的都替换成汉字呢?要保留原有格式,求指教。
...全文
129 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
yzy8788 2011-04-28
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 fangxinggood 的回复:]
C# code
var conv = Regex.Unescape(content);
[/Quote]
感激不尽,Regex尽然还有这个方法,我以为只有js中有呢,害我琢磨了老长时间。
看君一段码,甚读十年书啊。
我姓区不姓区 2011-04-28
  • 打赏
  • 举报
回复
要转换到哪里?
机器人 2011-04-28
  • 打赏
  • 举报
回复
var conv = Regex.Unescape(content);

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧