Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 17183 invoked from network); 5 Dec 2008 15:34:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2008 15:34:57 -0000 Received: (qmail 14327 invoked by uid 500); 5 Dec 2008 15:35:08 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 14198 invoked by uid 500); 5 Dec 2008 15:35:08 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 14187 invoked by uid 99); 5 Dec 2008 15:35:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2008 07:35:07 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.21] (HELO gmp-eb-inf-1.sun.com) (192.18.6.21) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2008 15:33:37 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12]) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id mB5FYKOX023264 for ; Fri, 5 Dec 2008 15:34:23 GMT Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0KBE00701TSP7800@fe-emea-09.sun.com> (original mail from Knut.Hatlen@Sun.COM) for derby-user@db.apache.org; Fri, 05 Dec 2008 15:34:20 +0000 (GMT) Received: from localhost ([77.106.180.49]) by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0KBE00GGKTX4W250@fe-emea-09.sun.com> for derby-user@db.apache.org; Fri, 05 Dec 2008 15:34:17 +0000 (GMT) Date: Fri, 05 Dec 2008 16:34:18 +0100 From: Knut Anders Hatlen Subject: Re: ORDER BY and greek characters In-reply-to: <4934051D.6010009@sun.com> Sender: Knut.Hatlen@Sun.COM To: Derby Discussion Message-id: MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT References: <20748193.post@talk.nabble.com> <4934051D.6010009@sun.com> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (usg-unix-v) X-Virus-Checked: Checked by ClamAV on apache.org Rick Hillegas writes: > tom_ wrote: >> I'm using ORDER BY and a database with collation territory based de_DE. >> Strings starting with greek characters are at the end of the resultset. >> Users would expect them near the respective latin character, e.g. greek >> "alpha" near "a". Is there a possiblity to sort in this way? >> > Hi Tom, > > Here a couple suggestions: [...] > 2) You could change Derby so that it supports user-defined Locales > with custom collations. I haven't looked into the details here, but > this seems like a smallish task--gated by a community discussion about > how to declare these user-created Locales. > > + This would be generally useful. > + Indexes would work for you and give your queries better performance. > - This solution wouldn't hit production until Derby 10.5 at the earliest. This can in fact be done with no changes to the Derby code, since Java SE 6 has an API for defining custom locales and collation rules. I have given an example of how you can use this to achieve what you want here: http://blogs.sun.com/kah/entry/user_defined_collation_in_apache Hope this helps, -- Knut Anders