简体   繁体   中英

How do I decode escaped unicode characters into normal characters?

How do I decode replace escaped Unicode characters back to characters? I've tried online Unicode Decoders and this article: How to convert a string with Unicode encoding to a string of letters , but none of them working.

I have the following characters encoded like below:

\ua6ad\ua6ad\ua6b3\ua6ae
\ua6ae\ua6b3\ua6b3\ua6ad
\ua6b2\ua6b3\ua6b3\ua6ae$\ua6ad\ua6b0\ua6ae\ua6b1$\ua6ae\ua6b2\ua6b1\ua6af

Code Itself:

public class \ua6b3\ua6af\ua6b3\ua6ad
{
    public static final boolean \u200e;
    
    public \ua6b3\ua6af\ua6b3\ua6ad() {
        final boolean \u200e = \ua6b3\ua6af\ua6b3\ua6ad.\u200e;
        if (!\u200e) {
            return;
        }
    }
    
    public void \ua6b2\ua6b2\ua6b0\ua6ae() {
        final boolean \u200e = \ua6b3\ua6af\ua6b3\ua6ad.\u200e;
        if (!\u200e && !\u200e) {
            return;
        }
    }
    
    public void \ua6b2\ua6b2\ua6b1\ua6b2(final int n, final int n2) {
        final boolean \u200e = \ua6b3\ua6af\ua6b3\ua6ad.\u200e;
        if (!\u200e && !\u200e) {
            return;
        }
    }
    
    public void \ua6ad\ua6b2\ua6ae\ua6b3(final int n, final int n2, final int n3) {
        final boolean \u200e = \ua6b3\ua6af\ua6b3\ua6ad.\u200e;
        if (!\u200e && !\u200e) {
            return;
        }
    }

These characters seem to be Bamum . You can simply read this text and print it, for example:

public static void main(String[] args) {
    String str = "public static void \ua6b2\ua6b2\ua6b0\ua6ae() {";
    System.out.println(str);
    ꚲꚲꚰꚮ();
}

public static void ꚲꚲꚰꚮ() {
    System.out.println("it works!");
}

Output:

public static void ꚲꚲꚰꚮ() {
it works!

If these characters are some kind of substitution cipher , you can try to find the encoding dictionary , but this can be impossible.


See also: Replacing a character in a string with another character from another string

Looks like this is an obfuscated code. Even if you translate these unicodes to their symbols you'll not be able to read the code unless your text editor has the font installed.
Also, the boolean variable named '\‎' is no printing type unicode. See the explanation here decoding \‎ to string .

The original names of the class and members have been replaced with junk. You'll have to gate the original code to analyze it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM