Skip to content

Instantly share code, notes, and snippets.

Forked from korakot/
Created February 20, 2023 10:44
What would you like to do?
Thai Sort
import icu
thkey = icu.Collator.createInstance(icu.Locale('th_TH')).getSortKey
words = 'ไก่ ไข่ ก ฮา'.split()
print(sorted(words, key=thkey)) # ['ก', 'ไก่', 'ไข่', 'ฮา']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment