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

Incomplete specification for Character.isUnicodeIdentifierStart(ch)

    Details

    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_nt

      Description



      Name: ooR10006 Date: 01/04/2001


      The jdk1.4.0beta-b45 specification for method Character.isUnicodeIdentifierStart(ch) reads:
      "public static boolean isUnicodeIdentifierStart(char ch)
      Determines if the specified character is permissible as the first character
      in a Unicode identifier. A character may start a Unicode identifier if and
      only if it is a letter..."

      However, jdk1.4beta-b45, jdk1.3, jdk1.2.2 API implementations consider not only
      letters to be a Unicode identifier start, but also characters whose Unicode general type
      is "Nl" which are not letters (according to the Character.isLetter(ch) method specification).
      This concerns Character.isJavaIdentifierStart(ch) method as well.

      The following simple test shows this:

      public class test {
          public static void main(String[] args){
              for (int i = 0; i <= 65535; ++i){
                  if (Character.isLetter((char) i) != Character.isUnicodeIdentifierStart((char) i)){
                      System.out.print("0x" + Integer.toHexString(i));
                  }
              }
          }
      }

      novo81% jdk1.4.0beta-b45/solsparc/bin/java -cp . test
      0x2160 0x2161 0x2162 0x2163 0x2164 0x2165 0x2166 0x2167 0x2168 0x2169 0x216a 0x216b
      0x216c 0x216d 0x216e 0x216f 0x2170 0x2171 0x2172 0x2173 0x2174 0x2175 0x2176 0x2177
      0x2178 0x2179 0x217a 0x217b 0x217c 0x217d 0x217e 0x217f 0x2180 0x2181 0x2182 0x2183
      0x3007 0x3021 0x3022 0x3023 0x3024 0x3025 0x3026 0x3027 0x3028 0x3029 0x3038 0x3039 0x303a
      novo81%


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

        Attachments

          Issue Links

            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: