Simon Slavin <slav...@hearsay.demon.co.uk> wrote: > On 18 Sep 2009, at 9:57pm, Igor Tandetnik wrote: > >> Simon Slavin >> <slav...@hearsay.demon.co.uk> wrote: >>> On 18 Sep 2009, at 9:07pm, Roger Binns wrote: >>> >>>> Simon Slavin wrote: >>>>> * Unicode support from the ground up >>>> >>>> SQLite already has "unicode support from the ground up". Try using >>>> non-Unicode strings and you'll see! >>> >>> SQLite's indexing correctly understands how to order Unicode >>> strings ? >> >> With ICU extension enabled and correct collation specified, yes. Note >> that the correct ordering of Unicode strings is locale-dependent. > > Okay. So I create an indexed database in one locale. I have a > thousand records in there. The indexes are created using the locale I > set. I then send a copy of this database to a client in another > place, and the client has different locale settings. The client adds > another thousand records with their locale settings. What happens > when I use WHERE clauses with '<' or '>' ? Does the system vaguely > work, or does it get a mess ?
I'm not sure what you mean by "the client has locale settings". Has them where, and how are these settings supposed to affect SQLite database? When you create a table or an index, you may explicitly specify the collation each field should use. Like this: SELECT icu_load_collation('he_IL', 'hebrew'); create table myTable(myField text collate hebrew); -- and/or create index myIndex on myTable(myField collate hebrew); Using ICU extension does require certain discipline. You must run icu_load_collation soon after opening the database, and all users of the database must agree to map the same identifiers to the same locales (the best way to achieve that is probably to make collation name the same as locale name: SELECT icu_load_collation('he_IL', 'he_IL'); ). Mapping the same collation identifier to different locales may indeed result in corrupted indexes. For more details, see http://www.sqlite.org/cvstrac/fileview?f=sqlite/ext/icu/README.txt Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users