In my database, I have records in both Cyrillic and Latin characters. By default, they are listed alphabetically with Latin records first:
abc... bcd... cde... абв...
I would like to put the Cyrillic to the first place:
абв... abc... bcd... cde...
What I have tried so far:
This solution. It is not so great because it only sorts by the first word, and I can have both Cyrillic and Latin words in the same string (or even mixed characters in the same word).
Writing my own lists with Cyrillic and Latin alphabets. It works but is not great at all. I cannot take into account all possible letters in the two alphabets, including those with diacritics and write them down.
I have also been looking into PyICU but don't see how I can put it to use.
My guess is that I should use some custom collation here. The question is how this can be done in practice.