JDK-4117567 : Character.getType() needs to handle surrogates
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.2.0,1.4.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1998-03-06
  • Updated: 2002-07-16
  • Resolved: 2002-07-16
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description

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);
}
======================================================================

Comments
WORK AROUND Name: bb33257 Date: 03/05/98 ======================================================================
11-06-2004

EVALUATION Determined that this is not necessary for merlin at this time. john.oconner@Eng 2000-07-19 Name: nl37777 Date: 07/15/2002 This will be addressed by Tiger feature 4533872. ======================================================================
19-07-2000