0

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;
        }
    }
FlowRR
  • 3
  • 4
  • Does this answer your question? [How to convert a string with Unicode encoding to a string of letters](https://stackoverflow.com/questions/11145681/how-to-convert-a-string-with-unicode-encoding-to-a-string-of-letters) – the Hutt Mar 27 '21 at 14:17
  • Hello! I've tried that but it's not working? – FlowRR Mar 27 '21 at 14:18
  • If these are source files, you could use `native2ascii -reverse -encoding utf-8 ` (native2ascii is included with Java 8 and earlier). – Mark Rotteveel Mar 28 '21 at 15:49
  • Hello! thanks I've tried that one too it's showing nonsense the code itself obfuscated I think need to crack it. – FlowRR Mar 28 '21 at 16:25

2 Answers2

1

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

0

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 '\u200e' is no printing type unicode. See the explanation here decoding \u200e 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 Hutt
  • 16,980
  • 2
  • 14
  • 44
  • Thanks mate! So it's not possible to decode this Unicode? – FlowRR Mar 27 '21 at 15:45
  • Not all of them. Even if you do decode them it won't make sense, because the original data(names) have been lost. You'll have to put your own names keep renaming them as the code will make sense. If the code is huge it'll be very difficult to understand it. – the Hutt Mar 27 '21 at 15:49
  • The code is not huge at all it's a modpack and I want to port them into different versions the mod has only one package and 15 classes. – FlowRR Mar 27 '21 at 15:52
  • Please add this to the answer –  Mar 27 '21 at 20:45