Test script as below:
CREATE TABLE test ( title varchar(45) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO test (title) value ('🎉🚕');
The answer says:
1366 Incorrect string value: '\xF0\x9F\x8E\x89\xF0\x9F...' for column 'title' at row 1.
I am trying to install CHARSET on utf8 , utf16 , gbk , but the answers are the same.
I do not know how to name these characters “🎉🚕” and type them using the keyboard. But they are different from "♥ ☆", which can be stored in utf8 encoding.
Thanks.
source share