Unicode escape nonenglish characters in namespaces in P-code

This commit is contained in:
Jindra Petřík
2023-10-01 18:21:38 +02:00
parent 078d63c88e
commit 56fb0bc9f9
2 changed files with 70 additions and 16 deletions
@@ -269,7 +269,9 @@ public class Multiname {
break;
}
}
return constants.getNamespace(index).getKindStr() + "(" + (name == null ? "null" : "\"" + Helper.escapePCodeString(name) + "\"") + (sub > 0 ? ",\"" + sub + "\"" : "") + ")";
return constants.getNamespace(index).getKindStr() + "(" + (name == null ? "null" : "\"" +
Helper.escapePCodeEnglishString(name) //Note: Versioned ABC files have high unicode characters in namespaces, escape them
+ "\"") + (sub > 0 ? ",\"" + sub + "\"" : "") + ")";
}
public static String namespaceSetToString(AVM2ConstantPool constants, int index) {