diff --git a/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java b/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java index 526f98fd..d49ebf8f 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java +++ b/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java @@ -27,6 +27,7 @@ import brut.androlib.res.util.*; import brut.common.BrutException; import brut.directory.*; import brut.util.*; +import java.awt.event.KeyEvent; import java.io.*; import java.util.*; import java.util.logging.Logger; @@ -563,6 +564,14 @@ final public class AndrolibResources { return out.toString(); } + public static boolean isPrintableChar(char c) { + Character.UnicodeBlock block = Character.UnicodeBlock.of(c); + return ! Character.isISOControl(c) + && c != KeyEvent.CHAR_UNDEFINED + && block != null + && block != Character.UnicodeBlock.SPECIALS; + } + // TODO: dirty static hack. I have to refactor decoding mechanisms. public static boolean sKeepBroken = false;