MySQL don't want to store unicode character

前端 未结 3 1132
有刺的猬
有刺的猬 2020-12-05 15:51

Why won\'t MySQL store the unicode character

3条回答
  •  借酒劲吻你
    2020-12-05 15:55

    Since this question was posted, MySQL 5.5.3 was released which supports the utf8mb4 encoding which offers full Unicode support. Switching to this charset instead of utf8 would fix your problem.

    I’ve recently written a detailed guide on how to switch from MySQL’s utf8 to utf8mb4. If you follow the steps there, everything should work correctly. Here are direct links to each individual step in the process:

    • Step 1: Create a backup
    • Step 2: Upgrade the MySQL server
    • Step 3: Modify databases, tables, and columns
    • Step 4: Check the maximum length of columns and index keys
    • Step 5: Modify connection, client, and server character sets
    • Step 6: Repair and optimize all tables

    I suspect that your problem can be solved by following step 5. Hope this helps!

提交回复
热议问题