When to use utf-8 and when to use latin1 in MySQL?

后端 未结 8 1671
暖寄归人
暖寄归人 2021-02-13 21:56

I know that MySQL has default of latin1 encoding and apparently it takes 1 byte to store a character in latin1 and 3 bytes to store a character in

8条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-13 22:19

    If you allow users to post in their own languages, and if you want users from all countries to participate, you have to switch at least the tables containing those posts to UTF-8 - Latin1 covers only ASCII and western European characters. The same is true if you intend to use multiple languages for your UI. See this post for how to handle migration.

提交回复
热议问题