harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib] String.toLowerCase/toUpperCase incorrect for supplementary characters (HARMONY-6649)
Date Thu, 16 Sep 2010 14:50:47 GMT
On 16/Sep/2010 14:30, Robert Muir wrote:
> On Thu, Sep 16, 2010 at 9:26 AM, Tim Ellison <t.p.ellison@gmail.com> wrote:
> 
>> Yes, I agree (though I don't know what happens when it is uppercased
>> 'properly' in Turkish)
>>
> 
> in this case it would be uppercased to US-ASCİİ (note the dotted i's)
> 
> 
>> Nah, the Charset name is obliged to be a strict subset of characters
>> [1], so I propose we just deal with the transform directly in
>> CharsetProviderImpl without asking Character.
>>
>> [1]
>>
>> http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html
>>
>>
> +1, seems like now i understand why this constraint exists!

The principle works ok.  I attached a patch on HARMONY-6649 to show that
making a local toUpperCase() method for the charset names solves the
circularity problem in bootstrapping, and does the right thing
irrespective of locale.

There are some compatibility issues though, since on the RI
  String foo="foo";
  foo.toLowerCase() == foo

but it doesn't if we simply use ICU's toLowerCase method :-(

I also expect we need to fix String#equalsIgnoreCase() to do the right
thing...

Regards,
Tim

Mime
View raw message