简体   繁体   English

如何将转义的 unicode 字符解码为普通字符?

[英]How do I decode escaped unicode characters into normal characters?

How do I decode replace escaped Unicode characters back to characters?如何解码将转义的 Unicode 字符替换回字符? 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.我已经尝试过在线 Unicode Decoders 和这篇文章: How to convert a string with Unicode encoding to a string of letters ,但它们都不起作用。

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 .这些字符似乎是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.即使您将这些 un​​icode 转换为它们的符号,除非您的文本编辑器安装了该字体,否则您将无法阅读代码。
Also, the boolean variable named '\‎' is no printing type unicode.此外,名为 '\‎' 的布尔变量不是印刷类型 unicode。 See the explanation here decoding \‎ to string .请参阅此处将 \‎ 解码为 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.您必须对原始代码进行门控才能对其进行分析。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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