Example usage for java.lang Character getName

List of usage examples for java.lang Character getName

Introduction

In this page you can find the example usage for java.lang Character getName.

Prototype

public static String getName(int codePoint) 

Source Link

Document

Returns the Unicode name of the specified character codePoint , or null if the code point is #UNASSIGNED unassigned .

Usage

From source file:Main.java

public static void main(String[] args) {
    int ch = '\u06aa';

    System.out.println(Character.getName(ch));

}

From source file:ca.nines.ise.cmd.Wikify.java

private void wikifyCharacters(PrintStream out) {
    // accented//from  w  w w  . j av a2 s  .  c  o m
    try {
        Map<String, String> cm = AccentCharNode.mapping();
        Writer xmlOut = new XMLWriter(out);
        CharNode cn = new AccentCharNode();
        Formatter formatter = new Formatter(out);

        for (String c : cm.keySet()) {
            cn.setText("{" + c + "a}");
            formatter.format("%s %s %s %s%n", c, Character.getName(cm.get(c).charAt(0)), cn.getText(),
                    cn.unicode());
            xmlOut.render(cn.expanded());
            out.println();
        }

    } catch (Exception ex) {
        Logger.getLogger(Wikify.class.getName()).log(Level.SEVERE, null, ex);
    }

    // code point
    // digraph
    // ligature
    // space
    // typographic
    // unicode
    // nested
}