-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
generic
-
generic
Name: ooR10006 Date: 01/04/2001
jdk1.4.0beta-b45 API specification for the method Character.toTitleCase(ch)
is inaccurate. It states:
"public static char toTitleCase(char ch)
Converts the character argument to titlecase using case mapping information from
the UnicodeData file. If a character has no explicit titlecase mapping according to
UnicodeData, then the uppercase mapping is returned as an equivalent titlecase mapping."
This is incorrect algorithm for those chars of Unicode category "Lt" which are
titlecase chars themselves but also have uppercase mappings that differ
from the char's codepoints.
For example, for the following chars Unicode3.0.0 defines:
CODEPOINT UPPER_CASE LOWER_CASE TITLE_CASE CATEGORY
0x01C5 0x01C4 0x01C6 no "Lt"
0x01C8 0x01C7 0x01C9 no "Lt"
0x01CB 0x01CA 0x01CC no "Lt"
0x01F2 0x01F1 0x01F3 no "Lt"
Following the specified algorithm Character.toTitleCase((char)0x01C5) should return
0x01C4, but in fact jdk1.4.0beta-b45 Character.toTitleCase((char)0x01C5) returns
correct 0x01C5.
======================================================================
- duplicates
-
JDK-4404977 Incomplete or inaccurate Character spec
- Closed