The Ukrainian Alphabetical Sort orders a list of words the way a Ukrainian dictionary does. It fixes the two places where a naive computer sort goes wrong: the position of Ґ relative to Г, and the order of И, І, and Ї.
How it works
The tool defines the full Ukrainian alphabet as an ordered string and assigns each letter a rank from its position in that sequence: А=1, Б=2, … Г=4, Ґ=5, … И=11, І=12, Ї=13, …. To compare two words it converts each to a list of ranks, skipping the apostrophe, then compares position by position — the first differing rank decides the order, and a shorter prefix sorts first. Characters outside the alphabet (Latin letters, digits) receive ranks above every Ukrainian letter so they sort last but remain deterministic.
Notes and example
гора,ґанок,голубsort asголуб,гора,ґанок— Ґ falls in right after the Г words, not at the far end.икати,ірій,їжакsort in exactly that order, because И precedes І precedes Ї.- The apostrophe is transparent, so
п'ятьcollates as though it wereпять. - Tick Sort Z→A to reverse the whole list while keeping the same Ukrainian letter ranking.