Home >Database >Mysql Tutorial >How Can I Store iOS5 Emojis (4-Byte UTF-8 Characters) in MySQL 5.5.10?
Storing UTF-8 MB4 Characters in MySQL
You have encountered an issue storing iOS5 emojis, which require 4-byte coding, in MySQL 5.5.10. This guide will provide solutions to address this problem and ensure proper storage of these characters.
Prerequisites
Ensure that your MySQL configuration has been updated to support UTF-8 MB4 character sets across the database, client, and server. Refer to the provided character set details for confirmation.
Troubleshooting Steps
ALTER TABLE mytable charset=utf8mb4, MODIFY COLUMN textfield1 VARCHAR(255) CHARACTER SET utf8mb4, MODIFY COLUMN textfield2 VARCHAR(255) CHARACTER SET utf8mb4;
SET NAMES utf8mb4;
By verifying these settings and implementing these steps, you should be able to successfully store and display iOS5 emojis in your MySQL database.
The above is the detailed content of How Can I Store iOS5 Emojis (4-Byte UTF-8 Characters) in MySQL 5.5.10?. For more information, please follow other related articles on the PHP Chinese website!