Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4404588

Character.UnicodeBlock.of(ch) returns wrong value for 0xFFFF, 0xFFFE

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic, x86
    • OS:
      generic, linux
    • Verification:
      Verified

      Description



      Name: ooR10006 Date: 01/14/2001


      jdk1.4.0beta-b47 API method Character.UnicodeBlock.of(ch) returns incorrect
      value for 0xFFFE and 0xFFFF chars.
      According to Unicode3.0 standard these chars don't belong to any block.
      But jdk1.4.0beta-b47 API implementation of Character.UnicodeBlock.of(ch)
      returns Unicode block "SPECIALS" instead of null.

      The following simple test reproduces this:

      public class test {
          public static void main(String[] args){
              System.out.println(Character.UnicodeBlock.of((char)0xFFFE).toString());
              System.out.println(Character.UnicodeBlock.of((char)0xFFFF).toString());
          }
      }

      Due to this, updated according to Unicode 3.0 in JCK Merlin test
      api/java_lang/Character/UnicodeBlock/index.html#Methods[UnicodeBlock0002]
      and new JCK Merlin test
      api/java_lang/Character/UnicodeBlock/index.html#Methods[UnicodeBlock2002]
      fail.

      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              joconnersunw John Oconner (Inactive)
              Reporter:
              ovosunw Ovo Ovo (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: