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

String.toLowerCase incorrectly converts the letter \u03A3

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: skR10005 Date: 10/26/2001


      The JCK tests
      api/java_lang/String/multimapping.html#CaseMapping[String2301]
      api/java_lang/String/multimapping.html#CaseMapping[String2304]
      fail on jdk1.4.0beta-b84.

      The additional file of Unicode specification SpecialCasing-2.txt contains
      the special letters which do not follow the main table of letter
      conversion. One of this letter is \u03A3. The entry for this letter is
      # Special case for final form of sigma

      03A3; 03C2; 03A3; 03A3; FINAL; # GREEK CAPITAL LETTER SIGMA

      It contains the condition FINAL. The head of this file explains:
      # A condition list overrides the normal behavior if any of the listed conditions is true.
      # FINAL: The letter is not followed by a letter of category L* (e.g. Ll, Lt, Lu, Lm, or Lo).

      But it seems, the JDK implementation does not take into account this condition.
      To reproduce this failure the simple test can be used:
      =======================================================
      public class A {
          public static void main(String[] argv) {
              String checkedString = "\u03A30";
              String ExpectedLowerString = "\u03C20";
              if(!checkedString.toLowerCase().equals(ExpectedLowerString))
                  System.out.println("Incorrect lowercase");
              else
                  System.out.println("ok");
          }
      }
      =======================================================
      $java -version
      java version "1.4.0-beta3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
      Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)

      $javac -d . A.java

      $java -cp . A
      Incorrect lowercase


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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nlindenbsunw Norbert Lindenberg (Inactive)
                Reporter:
                serjsunw Serj Serj (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: