On 6/27/07, Jiri Hajek <[EMAIL PROTECTED]> wrote:
>  Trevor proposed method doesn't need that, because the collation data
> goes with the database (which is the big advantage to me). And if you
> want to use another collation, you only need to import the collation
> data needed for that locale.

Well, Trevor's proposal sounds good indeed, but realistically, I don't
see any big chances it to be implemented - collations aren't that
simple and maintaining all the related issues without relying on some
external code is probably too much to expect.

Well, MySQL does it since v4.1, and from what I googled (I don't have
the links on this PC), the collation data needed with the adjustments
(tailoring) for the different locales [1] is not that much (and it
doesn't change the algorithm code, only data tables are needed).

From what I have seen, the Unicode Collation Algorithm (UCA) [2] is
already a good base for general ordering, and it seems the European
Ordering Rules (EOR) [3] is similar to UCA with the Default Unicode
Collation Element Table - DUCET, which already is good enough for many
people (including 90% of my needs).

Yesterday it looked like unicode.org was down  and I haven't had the
chance to look at the UCA report (UTS #10) in depth, but I will try to
come up with a proposal for sqlite.

My idea is to implement the UCA collation in SQLite (with the usual
OMIT_* #ifdef's), using the DUCET table as base, and if people need
the tailoring part for localized sorting, have it be optional by
having a "sqlite_collation_data" table with the needed locale data
included on the database.

One thing I noticed is that "collations" != "case change". This will
not make it possible to use UPPER/LOWER with the same data on the
table, but maybe we can work on something in that respect, also.


Regards,
~Nuno Lucas

[1] http://developer.mimer.com/collations/charts/index.tml
[2] http://www.unicode.org/reports/tr10/
[3] http://en.wikipedia.org/wiki/European_Ordering_Rules


Jiri

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to