harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: [classlib][luni] String.toLowerCase/toUpperCase incorrect for supplementary characters (HARMONY-6649)
Date Fri, 24 Sep 2010 02:55:10 GMT
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()


-- 
Robert Muir
rcmuir@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message