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

Character.getType() needs to handle surrogates

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.2.0, 1.4.0
    • core-libs
    • generic
    • generic



      Name: bb33257 Date: 03/05/98


      Once surrogate characters start to be defined, Character.getType()
      will need to be expanded to take two characters. Internally,
      the code will need to be modified to efficiently store the
      character properties for surrogates.

      For ease of use, String.getType(int position) should also be
      added. It would be the equivalent of:

      ch = charAt(position);
      if (ch >= \uD800 && ch < \uDC00 && position + 1 < length()) {
       return Character.getType(ch,charAt(position+1));
      } else {
       return Character.getType(ch);
      }
      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            bcbeck Brian Beck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: