Got some problems with sorting in wordpress again, posting a short solution.
Does the response return rows in incorrect order, in the sense that letters like Å and Ä are counted as A and Ö counts as O, even though you specified an “order by” statement? The fault probably lies in the table’s collation.