• Miikka

    (@miikkamakela)


    Hello,

    Scandinavians probably know the annoyance of this, but why is the default config collate utf8? Why is there no option to choose it in the installation?

    utf8mb4_unicode_ci should be used to make sorting work with å,ä,ö.

    It’s been years and this is not changing. What gives?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Can you explain further what you mean by ‘installation’ are you usinga script or tool?

    As far as I understand the collation you set manually when you create the database and there is no need to set else where once you have done that ( https://developer.wordpress.org/apis/wp-config-php/#database-collation )

    Moderator bcworkz

    (@bcworkz)

    The collation is determined when you create a new DB for your WP installation. WP doesn’t do this for you, though some host’s one click installation procedures may take care of this for you. When you create a new DB, you’re prompted to select an appropriate collation. The default collation through phpMyAdmin is latin1_swedish_ci. (The original devs were Swedish coders) This should be adequate for at least Sweden if not its Scandinavian neighbors. Many people accept the default for lack of deeper understanding. It’s probably acceptable for many languages even if not Swedish.

    You don’t really need to specify collation in wp-config.php, it can be left as an empty string. Only specify if you’re sure what your DB collation is. Personally, I’d select one of the utf8mb4 variants for my DB. There are utf8mb4 variants for a large number of the most common languages, including Swedish. But not specifically Norwegian or Finnish.

    Note that DBs can have multiple collations. There’s the overall DB collation, as well as individual collations for each table and any textual columns as well. Unless you have good reason not to, all of these should generally be the same as the overall DB collation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp-config default collate value or give us an option during install’ is closed to new replies.