eno wrote:

well, the question is: Support UTF-16 to what extent? I think here of sorting questions, (but other may arise). Obviously, sorting within a single language is specific to that language, whereas sorting a, say, german word with an ukrainian word is what a programmer calls "undefined". And comparing two german words - according to the rules a german user would expect - might be different from what a default comparison routine would return.



The programmer can use sqlite3_create_collation() to register collating sequences for any languages she wants. You can then say things like:

   SELECT addr FROM phonebook ORDER BY name COLLATE german;
   CREATE INDEX idx1 ON phonebook(name COLLATE ukrainian);
   CREATE TABLE phonebook(
     name1 TEXT COLLATE french,
     name2 TEXT COLLATE japanese,
     addr  TEXT
   );

Unlike client/server databases which much provide a predefined
set of sort orders, SQLite provides a single simplistic sort
order plus the capability for the programmer to add whatever other
sort orders are desired.

--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to