Search code examples
mysqlcollationcreate-table

Mysql table configuration to insert and select different languages


I am building a web site with a form. This form may be filled in different languages (from English and Spanish to Japanese and Arabic)

I have two questions:

Knowing that, how would you configure the mysql table where the data is going to be stored?

My web is UTF8, is that correct?


Solution

  • If you will be accepting Chinese, too, then go all the way -- use utf8mb4. That is a superset of utf8; to handle a few more Chinese characters.

    For collation, utf8mb4_unicode_520_ci is probably the best overall.