Utf8_general_ci or utf8mb4 or...?

Viewed 31976

utf16 or utf32? I'm trying to store content in a lot of languages. Some of the languages use double-wide fonts (for example, Japanese fonts are frequently twice as wide as English fonts). I'm not sure which kind of database I should be using. Any information about the differences between these four charsets...

2 Answers

utf8mb4 is the best.

utf8mb4 supports 4 bytes per character compared to utf8's 3 bytes per character, so it covers a wider range of uses without error.

With utf8mb4 you can support emojis, for example. If you try to insert an emoji in an unsupported character set you will get errors.

utf8mb4 is the more modern version of the 2 and will replace the older version eventually.

Related