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

Character.isMirrored(c) returns true for undefined chars

XMLWordPrintable

    • beta2
    • generic
    • generic
    • Verified



      Name: ooR10006 Date: 05/03/2001


      Since jdk1.4.0beta-b59 Character.isMirrored(c) returns true
      instead of false for undefined chars, total 7829 chars.

      The spec for isMirrored(char) says:
      "Returns:
       true if the char is mirrored, false if the char is not mirrored or is not defined."

      The following test shows the failure:

      public class Test {
          public static void main(String[] args){
              int[] c = {0x0220, 0x0221, 0x0234, 0x0235, 0x0236, 0x0237, 0x0238, 0x0239,
                  0x023a, 0x023b, 0x023c, 0x023d, 0x023e, 0x023f, 0x0240, 0x0241, 0x0242,
                  0x0243, 0x0244, 0x0245, 0x0246, 0x0247, 0x0248, 0x0249, 0x024a, 0x024b,
                  0x024c, 0x024d, 0x024e
              };
              String s = "";
              for(int i = 0; i < c.length; ++i){
                  s += " " + Character.isMirrored((char)c[i]);
              }
              System.out.println(s);
          }
      }

      % jdk1.4.0beta-b58/solsparc/bin/java Test
       false false false false false false false false false false false false false false
       false false false false false false false false false false false false false false
       false
      % jdk1.4.0beta-b59/solsparc/bin/java Test
       true true true true true true true true true true true true true true true true true
       true true true true true true true true true true true true
      %

      Due to this Merlin JCK test fails:
      api/java_lang/Character/index.html#attributesFullRange[Character2080]

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: