-
Bug
-
Resolution: Fixed
-
P2
-
9
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8056785 | emb-9 | Unassigned | P2 | Resolved | Fixed | b25 |
This bug is reported by Robert Muir (rcmuir@gmail.com) from Apache Lucene project.
On 05/ 6/14 12:17 AM, Robert Muir wrote:
> It seems there is a bug in String.toLowerCase.
> This character is old since unicode 3.1 and does not have any
> context-sensitive casing behavior.
>
> public void testThis() throws Exception {
> String text = "\ud801\udc1c"; // U+1041C DESERET
> CAPITAL LETTER THEE
> String expectedLower = "\ud801\udc44" ; // U+10444 DESERET
> SMALL LETTER THEE
>
> // lowercase works correct in isolation
> assertEquals(expectedLower, text.toLowerCase(Locale.ROOT));
>
> // add "A" in front, it breaks
> String text2 = "A" + text;
> String expected2 = "a" + expectedLower;
> assertEquals(expected2, text2.toLowerCase(Locale.ROOT));
> }
Given the
String text = "\ud801\udc1c"; // U+1041C
String text2 = "A" + text;
System.out.println(text2.toLowerCase(Locale.ROOT));
The output with jdk 8 and 8u20 ea b12 is : aU+10444 as expected. - (Pass).
The output with jdk 9 ea b11 is: aU+1041C. - (Fail)
- backported by
-
JDK-8056785 String.toLowerCase do not work for some concatenated strings
-
- Resolved
-