At first glance, I thought this was an easy problem to have, but apparently it is certainly not! I came across an Oracle whitepaper <http://www.oracle.com/technetwork/products/globalization/twp-appdev-linguistic-sorting-10gr2-132064.pdf> that describes how to sort your linguistic data, and you might find some clues there to adapt with your current db. http://ilmarkerm.blogspot.com/2009/07/using-linguistic-indexes-for-sorting-in.html is an old post describing linguistic indexes in postgres and mysql, but the dbs used are almost 8 years out of date, so you might have to update the syntax to your current version.
On Monday, February 5, 2018 at 6:56:00 PM UTC-5, Mike Dewhirst wrote: > > Chemical names start with both upper and lower case as well as Greek > characters. Chemical names also exist in multiple non-western non-latin > languages. > > To get lists of chemicals sorting more or less "correctly" I currently > slugify with allow_unicode=True. > > This for example gets tert-Butyl... sorted nicely among names starting > with upper-case T. > > Unfortunately the α-terpineol or beta this or ε that all sink to the > end of the list instead of sorting into the A, B or Es. > > My google-fu indicates I can sort on a property but that is slow. I have > thought about tweaking slugify to include a table of equivalences > between Greek and Western chars but that doesn't necessarily cater for > non-Western character sets. Maybe an ever expanding table of equivalences? > > Thanks for any ideas ... > > Mike > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1a1ad0d7-f6b5-4397-beb4-0f15964cabf2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.