Folder display sorting, ASCII order, special characters

I noticed that the folder display sort order in DOpus doesn't match ASCII order. Characters like { and ~ are sorted before alphanumeric characters. Likewise, various extended-ASCII non-alphanumeric characters like ¦, ±, §, ‡, @, ¶, ∫, ♪, ▌, ∑, etc are sorted before alphanumeric characters with no correlation to ALT codes or Unicode codes.

On the other hand, alphanumeric characters like ア, ㄱ, ሀ, א, α, ա, ა, ก, ក, अ, க், అ, etc from non-English languages are sorted later.

I also noticed that DOpus and Explorer share this same sorting behavior, but it doesn't match sorting in various other apps.

I'm wondering:

  1. What is the formal specification for this sorting? Is there documentation somewhere?

  2. Does DOpus piggyback on some underyling Windows process or C++ algorithm for this sorting, or does it implement its own sorting algorithm? Are there options in DOpus to change it?

It's done by a Windows API and depending on the system locale.

Unicode sorting is not (or at least should not be) based on the numeric values of the characters; it's based on locale-specific sorting tables/rules.

There's some background here, but it's quite a complicated subject and the main thing is that the numeric values are not (necessarily) important to how things are sorted.

en.wikipedia.org/wiki/Collation
en.wikipedia.org/wiki/Unicode_Co ... _Algorithm