One of the responses to a question I asked yesterday suggested that I should make sure my database can handle UTF-8 characters correctly. How I can do this with MySQL?
The short answer: Use utf8mb4 in 4 places:
SET NAMES utf8mb4 or something equivalent when establishing the client's connection to MySQLCHARACTER SET utf8mb4 on all tables/columns -- except columns that are strictly ascii/hex/country_code/zip_code/etc. if you are outputting to HTML. (Yes the spelling is different here.)More info ;
UTF8 all the way
The above links provide the "detailed canonical answer is required to address all the concerns". -- There is a space limit on this forum.
Edit
In addition to CHARACTER SET utf8mb4 containing "all" the world's characters, COLLATION utf8mb4_unicode_520_ci is arguable the 'best all-around' collation to use. (There are also Turkish, Spanish, etc, collations for those who want the nuances in those languages.)