Support » Fixing WordPress » Sorting posts using the swedish alphabet

  • Resolved Icethrill


    My WordPress installation is using the english alphabet for ordering. I get Å and Ä before A when I should get it at the bottom.

    How do I change so it uses the swedish alphabet instead?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The order that text is sorted in is called a collation. WordPress uses utf8_general_ci. Interestingly enough, by default MySQL uses latin1_swedish_ci because Sweden is where it was originally developed.

    WP’s collation is specified in the wp-config.php file. See and for more information on this subject.

    Pay heed to the warning at the beginning of that second link: Warning: character set conversion is not a simple process. Please complete a backup of your database before attempting any conversion.

    After some hours of diving into phpmyadmin, lots and lots of articles… I finally found the solution.

    This should only be done if you got back ups on your database and test it first on a testserver. And only if your charset is utf8 from the beginning.

    In PhpMyAdmin I the selected the database I wanted to change (In my case the posts table). Click on Operations and change the Collation to ‘utf8_swedish_ci’. However this don’t solve the problem, it only effect newly created posts and not posts which was already in the database.

    Next step is to go where you write your SQL, in PhpMyAdmin there is an SQL tab. (Which I used).

    Write in this SQL (Change the ” to ´´):
    ALTER TABLE 'table_name' CONVERT TO CHARACTER SET utf8 COLLATE utf8_swedish_ci

    You will have to do this with ALL tables invidually. Ofcourse there might be a better way around this then how I did it. But maybe it helps someone.

    I see the Collation Errors (utf8_general vs latin1_swedish) in the error log,

    The question is… what problems can this cause if not remedied? Lots of posts on ways to try and fix, but not a lot on the actual problems the mismatch will cause.

    We’re trying to solve the random Page Not Found error in our Blog, and I see lots of the collation errors (looks like Spam coming in that maybe Asikmet is removing)..

    But if the collation is not made uniform, what problems can it cause?

    Our wp_ak_twitter and wp_commentmeta tables are utf8_general_ci, but all other wp tables are latin1_swedish_ci

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sorting posts using the swedish alphabet’ is closed to new replies.