Codegenesis G
Codegenesis G

Reputation: 89

What does collation utf8mb4_unicode_ci mean

I was working on a project and wanted to implement a posts table similar to the wordpress posts table to store page content.

So I basically copied the wp_posts table which is longtext however I noticed under collation it had utf8mb4_unicode_ci

I'm wondering what this means and what its necessary for?

Upvotes: 2

Views: 3128

Answers (1)

JTC
JTC

Reputation: 3474

utf8mb4_unicode_ci support full unicode in mysql databases.

More information can be found here https://mathiasbynens.be/notes/mysql-utf8mb4

Basically there are many characters in Unicode that cant be stored in table with utf8, thus resulting in data loss.

UTF-8 symbols take one to three bytes, but there are symbols that can take even 4, and these werent supported (utf8 - utf8mb4).

In wordpress this change from utf8 collation was cause of problems for some users, mostly because utf8mb4_unicode_ci is supported only in MySQL 5.5.3+.

Upvotes: 4

Related Questions