zoukankan      html  css  js  c++  java
  • unicode解码小工具

    常常看JS文件的时候,经常会遇到一些unicode编码后的中文,很难猜透是啥中文,所以会比较痛苦。虽然在线解码以及解码小工具都有,但都不是很好用,特别是那个unicode解码器2.0版,我竟然打不开。一气之下,Google了一下解码的方法,竟然只要一句C#语句(原文)就可以搞定,如下:

    private String DecodeUnicode(String dataStr)
    {
        Regex reg = new Regex(@"(?i)\\[uU]([0-9a-f]{4})");
        return reg.Replace(dataStr, delegate(Match m) { return ((char)Convert.ToInt32(m.Groups[1].Value, 16)).ToString(); });
    }

    虽然我不会C#,但看在已经安装了VS2008的份上,就跑了一下代码,测试通过。为了免去以后的痛苦,所以就把它编译成一个exe吧,顺便也就分享给大家吧。

    功能很简单,输入unicode编码后的内容,然后点击decode,自动还原成可读的unicode码。截图如下:

    image

    下载地址:http://sharesh.googlecode.com/files/deunicode.zip

  • 相关阅读:
    python10.31
    python10.29
    python10.28
    python10.27
    python10.25
    python10.24
    python10.23
    四边形不等式与决策单调
    0x57~0x59
    0x55~0x56
  • 原文地址:https://www.cnblogs.com/Tangf/p/2416127.html
Copyright © 2011-2022 走看看