MYSQL | what's the different betweenUTF8 and UTF8-mb4

Main different

The main different between utf8 and utf8-mb4 is utf8 is only 3 bytes but utf8-mb4 is 4bytes instead. Note that UTF8 have 4 bytes, utf8mb4 is the true utf8 character set.

In general, it is enough to use MySQL utf8 to set up a website, however, Some special (Chinese) characters or common emoji are not included in 3 bytes. Therefore, most Chinese characters are sufficient, but they cannot be used for all characters. If you want to use special characters or emoticons, you cannot use MySQL’s utf8 character set to store them.

UTF8 to UTF8mb4 does not cause incompatibility problems.

MYSQL | what's the different betweenUTF8 and UTF8-mb4

https://blog.kwunlam.com/MYSQL-what-s-the-different-betweenUTF8-and-UTF8-mb4/

Author

Elliot

Posted on

2022-06-18

Updated on

2023-05-07

Licensed under