Don't sort all the vowels to the top, and don't do any fancy syllable splitting. This gives a plain, Latin-style sort.
Meanwhile, it doesn't look like Array.sort is stable, so we'll tack on the original string at the end of the sort key. For example dâ is sorted as da,dâ. This basically has the effect of ignoring diacritics in a primary sort but then deferring to them as a tie-breaker.
Don't sort all the vowels to the top, and don't do any fancy syllable splitting. This gives a plain, Latin-style sort.
Meanwhile, it doesn't look like
Array.sort
is stable, so we'll tack on the original string at the end of the sort key. For exampledâ
is sorted asda,dâ
. This basically has the effect of ignoring diacritics in a primary sort but then deferring to them as a tie-breaker.