Getting Out of MySQL Character Set Hell (2009)
bluebox.net
bluebox.net
In short: you should only use utf8mb4 in mysql as charset, cause utf8 in mysql is a broken invented 3-byte charset that will explode when you input 4-byte characters (i.e. an emoji).
utf8mb4 is what the rest of the world actually calls utf8.
I was just pointing out that even if it was limited support, it wasn't a set of characters that MySQL came up with.
The article contains numerous half truths and generalizations (the kind someone in the process of learning would say) and not expertise.
Take what he says with a grain of salt.
Character set is specified separately from collation. It's like having a ford vs a ford headlight. The collation is a part of the character set.
You really SHOULD always say something equivalent to charset=utf-8 in your HTML head (naming your actual encoding, of course).
Seriously - is there ever any reason to use anything else on the Internet?
When I then get to a column type like email, I don't know what I should use. Dropping down to 7-bit case-insensitive sounds plausible, but another option would be to stick with utf8mb4 but case-insensitive?
Is there a best practice?
And then other collations like case-insensitive or accent-insensitive only when required, e.g. because the field is used for search.