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][luni] String.toLowerCase/toUpperCase incorrect for supplementary characters (HARMONY-6649)
Date Fri, 24 Sep 2010 04:10:41 GMT
On 24/Sep/2010 03:55, Robert Muir wrote:
> On Thu, Sep 23, 2010 at 10:33 PM, Tim Ellison <t.p.ellison@gmail.com> wrote:
>> So you'll see that I reverted the new String impl until we fix up the
>> possible cases in the boot sequence.
>> I was reviewing the callers of toLowerCase(), and see that
>> File#hashCode() uses that method (not in boot mind you).
>> The Java SE 6 spec for that method [1] has been clarified to add the
>> fact that when lowercasing the pathname on Windows the "Locale is not
>> taken into account on lowercasing the pathname string."
>> Thinking out loud -- so how does that work? How can we lowercase a
>> Unicode string without consideration of a locale?
> if it is not in boot, the easiest way would be to use
> toLowerCase(Locale.ENGLISH).
> While this might seem wrong, documentation on this issue was added in java
> 6.
> "To obtain correct results for locale insensitive strings, use
> toLowerCase(Locale.ENGLISH)."
> http://download.oracle.com/javase/6/docs/api/java/lang/String.html#toLowerCase()

Thanks.  Seems strange since it could obviously produce some 'unusual'
results.  In this case, computing a hashCode, it likely doesn't matter
if the result is a bogus string.


View raw message