Java: How to get Unicode name of a character (or its type category)?

Posted by java.is.for.desktop on Stack Overflow See other posts from Stack Overflow or by java.is.for.desktop
Published on 2010-03-14T18:57:36Z Indexed on 2010/03/14 19:05 UTC
Read the original article Hit count: 181

Filed under:
|
|

Hello, everyone!

The Character class in Java defines methods which check a given char argument for equality with certain Unicode chars or for belonging to some type category. These chars and type categories are named.

As stated in given javadoc, examples for named chars are
HORIZONTAL TABULATION, FORM FEED, ...;
example for named type categories are
SPACE_SEPARATOR, PARAGRAPH_SEPARATOR, ...

However, being byte or int values instead of enums, the name of these types are "hidden" at runtime.

So, is there a possibility to get characters' and/or type categories' names at runtime?

© Stack Overflow or respective owner

Related posts about java

Related posts about unicode