You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2010/09/16 16:47:35 UTC

[jira] Updated: (HARMONY-6649) String.toLowerCase/toUpperCase incorrect for supplementary characters

     [ https://issues.apache.org/jira/browse/HARMONY-6649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison updated HARMONY-6649:
---------------------------------

    Attachment: harmony6649.patch

Attaching file harmony6649.patch which is a *prototype* of the changes required for discussion.

It needs more more work because on the RI

String foo = "foo";
foo.toLowerCase() == foo

but it doesn't on this prototype, courtesy of ICU...

Also needs work on equalsIgnoreCase I expect.

> String.toLowerCase/toUpperCase incorrect for supplementary characters
> ---------------------------------------------------------------------
>
>                 Key: HARMONY-6649
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6649
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M15
>            Reporter: Robert Muir
>         Attachments: harmony6649.patch
>
>
> Simple testcase:
> {code}
>     assertEquals("\uD801\uDC44", "\uD801\uDC1C".toLowerCase());
> {code}
> Looking at modules/luni/src/main/java/java/lang/String.java, the problem is these methods iterate code units (char) not codepoints (int),
> and use Character.toLowerCase(char) and Character.toUpperCase(char), instead of Character.toLowerCase(int), and Character.toUpperCase(int)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.