MySQL not sorting swedish characters ÅÄÖ correct [solved]

Problem: When using ORDER BY or GROUP BY, the swedish characters Å,Ä and Ö is sorted as A and O.

Solution: add COLLATE utf8_swedish_ci to your ORDER BY or GROUP BY, for example:

SELECT field1,field2 FROM table1 ORDER BY field1 ASC

should be changed to:

SELECT field1,field2 FROM table1 ORDER BY field1 COLLATE utf8_swedish_ci ASC

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

nine − seven =