To answer the question, filenames are sorted in accordance with the unicode locale collation rules not code point order, the same as most file managers. For the rules see [here](https://unicode.org/reports/tr10/) which is likely to do strange things with punctuation characters.