There is often a problem when entering personal information in the database, that is, the user’s nickname with emoji in the database will be changed to “?? “To deal with it. Here’s why

  • When storing user information, the vARCHAR type is used and the default character set is UTF8.

Utf8 is currently 3 bytes long and contains no emoji characters. This makes it impossible to identify the full use of such data when it is stored. The “processing

We just need to change the field type of the data and choose UTF8MB4 type. You may also need to change the mysql default character bit UTf8mb4 and restart mysql.


Like my article, welcome to search the official account.”vm-321“. Looking forward to your joining us.