
Well, who is Gdel supposed to be? Come on IEEE, who is supposed to get this encoding stuff right if you guys can't! ;-)
Fanatic About Code Quality Since 2004
'\u2192'
or you found it in the tables of the Unicode Database. char
or int
value. All characters of the Unicode version 4.2.0 up to \u1FFFF
are covered except CJK Ideographs. For each Unicode block, e.g. Basic Latin (\u0000..\u007F
) or Aegean Numbers (\u10100..\u1013F
), there is a separate interface with the block's name defining all code-points defined in this block. First you need to import the blocks, e.g. import unicode.AegeanNumbers
. Then you can use the constants in your code like here:Character.charCount(BasicLatin.DIGIT_NINE)) // 1(And yes, I know, interfaces are a poor place for constants. They should only be used to model a behaviour of a class. See the AvoidConstantsInterface rule. But I was young and needed the money... ;-)
Character.getNumericValue(BasicLatin.DIGIT_NINE)) // 9
Character.charCount(NumberForms.ROMAN_NUMERAL_FIVE_HUNDRED)) // 1
Character.getNumericValue(NumberForms.ROMAN_NUMERAL_FIVE_HUNDRED)) // 500
Character.charCount(AegeanNumbers.NUMBER_EIGHT)) // 2
Character.getNumericValue(AegeanNumbers.NUMBER_EIGHT)) // 8
\u10000
, called code-points, you need Java 1.5 or newer. UCC is Open Source under the GPL license.