From 1166cb2f03f28ecce2a82b5a923501d698de7d6f Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Thu, 1 Dec 2011 03:31:57 +0000 Subject: [PATCH] ICU-8945 fix UCharacter.CJK_IDEOGRAPH_FOURTH_ code point X-SVN-Rev: 30997 --- .../core/src/com/ibm/icu/lang/UCharacter.java | 15 +++++++++++---- .../com/ibm/icu/dev/test/lang/UCharacterTest.java | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java b/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java index 5b4613df429..d7aba440f5b 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java @@ -4956,20 +4956,27 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection } /** - * {@icu} Return numeric value of Han code points. - *
This returns the value of Han 'numeric' code points, + * {@icu} Returns the numeric value of a Han character. + * + *

This returns the value of Han 'numeric' code points, * including those for zero, ten, hundred, thousand, ten thousand, * and hundred million. * This includes both the standard and 'checkwriting' * characters, the 'big circle' zero character, and the standard * zero character. + * + *

Note: The Unicode Standard has numeric values for more + * Han characters recognized by this method + * (see {@link #getNumericValue(int)} and the UCD file DerivedNumericValues.txt), + * and a {@link com.ibm.icu.text.NumberFormat} can be used with + * a Chinese {@link com.ibm.icu.text.NumberingSystem}. + * * @param ch code point to query * @return value if it is a Han 'numeric character,' otherwise return -1. * @stable ICU 2.4 */ public static int getHanNumericValue(int ch) { - // TODO: Are these all covered by Unicode numeric value data? switch(ch) { case IDEOGRAPHIC_NUMBER_ZERO_ : @@ -5994,7 +6001,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection /** * CJK Ideograph, Fourth code point */ - private static final int CJK_IDEOGRAPH_FOURTH_ = 0x56d8; + private static final int CJK_IDEOGRAPH_FOURTH_ = 0x56db; /** * CJK Ideograph, FIFTH code point diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterTest.java index f9afac61054..d7bc76c30aa 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterTest.java @@ -2855,7 +2855,7 @@ public final class UCharacterTest extends TestFmwk 0x8cb3, //CJK_IDEOGRAPH_COMPLEX_TWO_ 0x4e09, //CJK_IDEOGRAPH_THIRD_ 0x53c3, //CJK_IDEOGRAPH_COMPLEX_THREE_ - 0x56d8, //CJK_IDEOGRAPH_FOURTH_ + 0x56db, //CJK_IDEOGRAPH_FOURTH_ 0x8086, //CJK_IDEOGRAPH_COMPLEX_FOUR_ 0x4e94, //CJK_IDEOGRAPH_FIFTH_ 0x4f0d, //CJK_IDEOGRAPH_COMPLEX_FIVE_