1

I am using Asian characters in my android app, I learned already that some characters are not displayable because they are not supported by the system's fonts. I query a database with Asian characters and I often retrieve signs which are not displayable. These cases are usually not a problem for my application, but are irritating to the user if I display not supported characters. Is there something like a test of a sign for displayability in Android?

user1091534
  • 354
  • 6
  • 19

1 Answers1

2

This will be helpful

public boolean isPrintable( char c ) {
    Character.UnicodeBlock block = Character.UnicodeBlock.of( c );
    return (!Character.isISOControl(c)) &&
                    block != null &&
                    block != Character.UnicodeBlock.SPECIALS;
}

Please refer printable char in java

Community
  • 1
  • 1
Sripathi
  • 1,760
  • 15
  • 20
  • Not working for me. The `KeyEvent.CHAR_UNDEFINED` is not available. I used `KeyEvent.UNKNOWN` instead. But its still not working. – Ashish Tanna Sep 19 '15 at 00:14