Igor Tandetnik writes:

>This is not quite true. You say custom functions are supported: then you can 
>do ORDER BY sortkey(textField), >with a suitably defined sortkey() function 
>(see strxfrm, LCMapString). You can't however build indexes using >such a 
>function, something you can do with a collation.

True, that is how I current accomplish it, but it is very inefficient, since 
indexes cannot be used, and a javascript function end up being called for the 
row by row comparison.

>Sorting in many locales is not as simple as suitably ordering individual 
>Unicode characters. E.g. in German >phonebook order, letter ö (small o with 
>umlaut aka diaresis) sorts as if it were two letters oe, that is od < ö >< of. 
>In French, strings are compared ignoring diacritics first, then ties are 
>broken by considering diacritics >right-to-left. In Spanish traditional sort, 
>a pair ch sorts as if it were a single letter between c and d. Even >in 
>English, you would often want to sort co-op and coop, or cant and can't, in 
>such a way that they are kept >together.

>Consider also things like combinig diacritics.

Again I agree.  In fact, with my application, I am not only dealing with 
UTF-16, but also there is the issue of combined letter forms.

This is not a trivial topic, and I don't have a proposed solution.  However, I 
feel this thread is worth pursuing.  There are a lot of smart people on this 
list and who use SQLite.

If the SQLite developers would be willing to open a discussion about embedding 
this functionality, maybe some brainstorming could come up with an acceptable 
solution.


Regards, Noah 






CONFIDENTIALITY NOTICE: 
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to