icu

icu: Sort strings based on 2 different locales

icu: Sort strings based on 2 different locales Question: As you probably know, the order of alphabet in some (maybe most) languages is different than their order in Unicode. That’s why we may want to use icu.Collator to sort, like this Python example: from icu import Collator, Locale collator = Collator.createInstance(Locale("fa_IR.UTF-8")) mylist.sort(key=collator.getSortKey) This works perfectly …

Total answers: 4