diff --git a/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterTest.java b/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterTest.java index f2fa9a56ac2..dcbc3cfa5f2 100755 --- a/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterTest.java +++ b/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterTest.java @@ -5,8 +5,8 @@ ******************************************************************************* * * $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterTest.java,v $ -* $Date: 2003/06/03 18:49:30 $ -* $Revision: 1.56 $ +* $Date: 2003/06/03 22:41:26 $ +* $Revision: 1.57 $ * ******************************************************************************* */ @@ -284,6 +284,10 @@ public final class UCharacterTest extends TestFmwk */ public void TestNumeric() { + if (UCharacter.getNumericValue(0x00BC) != -2) { + errln("Numeric value of 0x00BC expected to be -2"); + } + for (int i = '0'; i < '9'; i ++) { int n1 = UCharacter.getNumericValue(i); double n2 = UCharacter.getUnicodeNumericValue(i); diff --git a/icu4j/src/com/ibm/icu/impl/Utility.java b/icu4j/src/com/ibm/icu/impl/Utility.java index 1197e478d38..6f9c1ea98a5 100755 --- a/icu4j/src/com/ibm/icu/impl/Utility.java +++ b/icu4j/src/com/ibm/icu/impl/Utility.java @@ -5,8 +5,8 @@ ******************************************************************************* * * $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/impl/Utility.java,v $ - * $Date: 2003/06/03 18:49:33 $ - * $Revision: 1.39 $ + * $Date: 2003/06/03 22:41:26 $ + * $Revision: 1.40 $ * ***************************************************************************************** */ @@ -19,6 +19,7 @@ public final class Utility { private static final char APOSTROPHE = '\''; private static final char BACKSLASH = '\\'; + private static final int MAGIC_UNSIGNED = 0x80000000; /** * Convenience utility to compare two Object[]s. @@ -1616,9 +1617,8 @@ public final class Utility { */ public static final int compareUnsigned(int source, int target) { - int MAGIC = 0x80000000; - source += MAGIC; - target += MAGIC; + source += MAGIC_UNSIGNED; + target += MAGIC_UNSIGNED; if (source < target) { return -1; } diff --git a/icu4j/src/com/ibm/icu/lang/UCharacter.java b/icu4j/src/com/ibm/icu/lang/UCharacter.java index 9a0aadbffac..e9ad0b19405 100755 --- a/icu4j/src/com/ibm/icu/lang/UCharacter.java +++ b/icu4j/src/com/ibm/icu/lang/UCharacter.java @@ -5,8 +5,8 @@ ******************************************************************************* * * $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/lang/UCharacter.java,v $ -* $Date: 2003/06/03 18:49:33 $ -* $Revision: 1.76 $ +* $Date: 2003/06/03 22:41:25 $ +* $Revision: 1.77 $ * ******************************************************************************* */ @@ -2346,10 +2346,11 @@ public final class UCharacter *
  • It is \u001C, FILE SEPARATOR. *
  • It is \u001D, GROUP SEPARATOR. *
  • It is \u001E, RECORD SEPARATOR. - *
  • It is \u001F, UNIT SEPARATOR. + *
  • It is \u001F, UNIT SEPARATOR. * * - * Up-to-date Unicode implementation of java.lang.Character.isWhitespace(). + * This API tries to synch to the semantics of the Java API, + * java.lang.Character.isWhitespace(). * @param ch code point to determine if it is a white space * @return true if the specified code point is a white space character * @stable ICU 2.1 @@ -2484,26 +2485,44 @@ public final class UCharacter } /** - * Determines if the specified code point should be regarded as an - * ignorable character in a Unicode identifier. - * A character is ignorable in the Unicode standard if it is of the type - * Cf, Formatting code.
    - * Up-to-date Unicode implementation of - * java.lang.Character.isIdentifierIgnorable().
    - * See UTR #8. - * @param ch code point to be determined if it can be ignored in a Unicode - * identifier. - * @return true if the code point is ignorable + *

    + * Determines if the specified character should be regarded as an ignorable + * character in a Java identifier or a Unicode identifier. + *

    + *

    + * The following Unicode characters are ignorable in a Java identifier or a + * Unicode identifier:
    + * ISO control characters that are not whitespace + *