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/4160ee4d-8b36-1118-1bec-2ba8ab40d891%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Reply via email to