Reflector's Chinese support method

Source: Internet
Author: User
Tags reflector

I was looking for a plugin, but I found this.

Reflector is my current use of the most decompile tool, he may be the best, but with its update speed, I believe he will become the best Oh ~ ~
Foreign software, there is still a problem with Chinese support, although we are Unicode, but the foreigner is not necessarily admit. Reflector decompile Code, Unicode characters in both English and Chinese are displayed for/u????, this is still right, but we look too depressed. Reflector support Plug-in, once wanted to write a plug-in, the results to understand too much, it gave up. But the problem is solved, with vs.net with the macros, haha

Before the conversion of the code, who can read what is written ah @_@.


Don't worry, the converted code becomes:


VS.NET macro code, Name: Unicode2character
Imports EnvDTE
Imports System.Globalization
Imports System.Text.RegularExpressions
Imports System.Diagnostics

Public Module Birdshome Module Birdshome

Sub Unicode2character () Sub Unicode2character ()
Dim doc as Document = DTE. ActiveDocument
Dim DocText as TextDocument = Doc. Object
Dim SelText as TextSelection = Doctext.selection ()
Seltext.selectall ()
Dim text as String = Seltext.text
Dim Ilength as Integer
Todo
Ilength = text. Length
Dim m as Match
Dim Strpattern as String = "(? <code>//u[a-f0-9]{4})"
m = Regex.match (text, Strpattern, regexoptions.ignorecase)
If m.success Then
Dim strvalue as String
strvalue = m.groups ("code"). Value
Text = text. Replace (strvalue, "")
Dim int as Integer
int = System.Int32.Parse (strvalue.substring (2, 4), Numberstyles.hexnumber)
Dim ch as Char = ChrW (int)
Doctext.replacepattern (strvalue, ch)
Else
Exit do
End If
If not text. Length < Ilength Then
Exit do
End If
Loop
Seltext.startofdocument ()
End Sub
End Module


Enjoy it!

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.