Alphabetic Ordering of Words in Thai

The Rules

1. Symbols are assumed to be in the order in which one types them.  Therefore เงิน is sara e, ngo ngu, sara i, no nu.
2. Swap round any preposed vowel and the following consonant.
3. Compare 'lexicographically', ignoring any tone mark, mai taikhu or thanthakhat.  The order of the symbols for sorting is consonants (ก, ข, ... อ, ฮ) and then vowels (ะ, ั, า, ำ, ... ไ).

Comparing lexicographically means to compare the symbols in the two words one at a time until corresponding unignored symbols are different or there are no further symbols to compare.  The word whose corresponding symbol comes first is the word that comes first.  If no differences are found but one word is shorter (ignoring ignored symbols), that word comes first.  This is the method used in English; accents are ignored in English, just as Thai tones are ignored at this stage.

4. If two different words compare equal, consider the first position at which they differ.  If one has an extra symbol there, it comes last. Otherwise, they are compared on the basis of the differing symbol, using the order   ็, ่, ้, ๊, ๋, ์.

As an example of rule 4, we have แหง, แหง่, แห่ง, แห้ง, ... แหงน and เหม, เหม่.

Demonstration and Explanation

Word 1:
Word 2: