ashish yadav <ashishyada...@gmail.com> wrote: > Actually i want to support Multilingual Linguistic Sorts. > The sorting order shall be approached by separating the character set into > three groups: > a. special characters (i.e. +, -, &, Space, etc.) > b. digits (0-9) > c. Latin/Greek(language) letters. > > The digits shall be sorted below the special characters and the letters > shall be sorted below the digits.
That's a strange definition of a linguistic sort, one I have never seen before. What kind of application would find such an order desirable? In the sort order you describe, how would the following strings be ordered: coal coop co-op corn How do you plan to deal with, say, combining diacritics? Do they count as letters or as special characters? > So i think,to achieve this we have to provide collation base on : > a.locale > b. customize collation rule ie "tailoring". > > But i don't know how to use both at same time in sqlite3 as locale base > collation use ucol_open() & customize collation rule use ucol_openRules(). I'm not really familiar with ICU API, and in any case, it's probably best discussed in a forum dedicated to ICU. You may find some of those mentioned here: http://site.icu-project.org/contacts Once you have a function that takes two strings and returns -1, 0 or 1 to indicate their relationship according to whatever ordering you want, it's fairly straightforward to wrap it in another function suitable to be installed as a custom collation into SQLite. If you need help with this last step, I would be happy to oblige, as would, no doubt, others on this list. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users