db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: [jira] Updated: (DERBY-1862) Simple hash improves performance
Date Tue, 19 Sep 2006 11:49:30 GMT
Andreas Korneliussen wrote:
> String.toUpperCase() is locale dependent, however I am not sure that
> String.equalsIgnoreCase() is locale dependend (does not seem so when
> reading the code and javadoc).
> I did find an issue with the German double s: ß.
> "ß".toUpperCase() returns "SS".

That is according to the Unicode standard.

> However "ß".equalsIgnoreCase("SS") returns false.

As far as I remember from my high-school German, is that even if all "ß" may be
converted to uppercase "SS", not all "SS" in uppercase may be converted to the
lowercase "ß". If the "SS" appears in a combined word (in German, words are
combined by concatenating them, as in Norwegian) where one word ends with "S"
and the second word starts with "S", the result when converted to lowercase
should be "ss" (I am trying to construct an example, but my German is very, very
rusty....... ;-)

> So basically, "ß".toUpperCase().equalsIgnoreCase("ß") returns false.
> The Derby method: SQLUtil.SQLIgnoreCase("ß", "SS") returns true (however
> the patch which I attached, will make it return false and therefore is
> not as intended).
> If my column name is "classnames", should it be accessible by using the
> string "claßnames" ?
> Regards
> Andreas

Bernt Marius Johnsen, Database Technology Group,
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway

View raw message