Unicode decoding tool

Source: Internet
Author: User

When reading JS files, I often encounter some Unicode-Encoded chinese characters. It is difficult to guess what Chinese is, so it is quite painful. Although online decoding and decoding tools are available, they are not very useful, especially for the Unicode decoder version 2.0. In a single breath, Google's decoding method can be achieved with only one C # Statement (original), as shown below:

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 ();});
}

Although I won't use C #, I ran it after installing vs2008.Code, Passed the test. To avoid future pain, compile it into an EXE and share it with you.

The function is simple. Enter the unicode encoded content and click decode to automatically restore it to a readable Unicode code. As follows:

: Http://sharesh.googlecode.com/files/deunicode.zip

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.