惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Visual Studio Blog
宝玉的分享
宝玉的分享
IT之家
IT之家
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
I
InfoQ
B
Blog RSS Feed
T
Threatpost
博客园_首页
M
MIT News - Artificial intelligence
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Know Your Adversary
Know Your Adversary
U
Unit 42
Engineering at Meta
Engineering at Meta
C
Cyber Attacks, Cyber Crime and Cyber Security
月光博客
月光博客
Scott Helme
Scott Helme
T
Tor Project blog
有赞技术团队
有赞技术团队
AWS News Blog
AWS News Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
S
Schneier on Security
Vercel News
Vercel News
博客园 - Franky
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
L
LangChain Blog
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
Latest news
Latest news
C
CXSECURITY Database RSS Feed - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
G
GRAHAM CLULEY
S
Security Affairs
A
About on SuperTechFans
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
大猫的无限游戏
大猫的无限游戏
W
WeLiveSecurity
Cisco Talos Blog
Cisco Talos Blog
罗磊的独立博客

博客园 - Pharaoh

jae的mongo数据库管理工具(原创) 面是否包含点的算法 简单的远程控制软件 学习Python,编写了个网站 - Pharaoh - 博客园 测试从Mathon插件发表 VS集成环境中的JavaScript脚本语法检查 测试用Windows Live Writer [转]滚动条颜色生成工具。 用资源管理器打开“打开文件”对话框的目录。 - Pharaoh - 博客园 用Word2007发Blog的配置方法(多图)。 - Pharaoh - 博客园 测试Word2007 用批处理写的显示磁盘剩余空间的小程序。 总算亲自看见了一个网站被黑后的页面。 [转]XP如何禁止媒体文件预览 Google Calendar V2.0汉化 快捷方便的对js文件进行语法检查。 用IronPython作为.Net的脚本语言。 C#通过http访问olap 事开机时Num Lock键打开。
将Unicode字符串转换为普通文字 - Pharaoh - 博客园
Pharaoh · 2009-05-26 · via 博客园 - Pharaoh

     Json传输中文时为了防止乱码,通常我们会进行Unicode编码 ,如{userID:"001",nickname:"\u65e0\u8bed\u68a6" }
    下面的代码,将能完成Unicode的与普通字符的转换功能,函数是在网上找的,做个记号

private string U2CnCode(string str)
{
    Match m;
    Regex r 
= new Regex("(?<code>\\\\u[a-z0-9]{4})", RegexOptions.IgnoreCase);
    
for (m = r.Match(str); m.Success; m = m.NextMatch())
    {
        
string strValue = m.Result("${code}");   //代码
        int CharNum = Int32.Parse(strValue.Substring(24), System.Globalization.NumberStyles.HexNumber);
        
string ch = string.Format("{0}", (char)CharNum);
        str 
= str.Replace(strValue, ch);
    }
    
return str;
}