CREATE TABLE IF NOT EXISTS `testx` ( `author` varchar(10) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `testx` (author) VALUES ('顾铮𠀡');
Incorrect string value: '\xF0\xA0\x80\xA1' for column 'author' at row 1
𠀡这个字是用 PHP html_entity_decode 来的:
$author = html_entity_decode('顾铮𠀡', ENT_QUOTES, 'UTF-8');
环境:Mac OSX 10.10 + MySQL 5.6、ubuntu 10.04 + MySQL 5.5
INSERT INTO `testx` (author) VALUES ('顾铮𠀡');
Incorrect string value: '\xF0\xA0\x80\xA1' for column 'author' at row 1
𠀡这个字是用 PHP html_entity_decode 来的:
$author = html_entity_decode('顾铮𠀡', ENT_QUOTES, 'UTF-8');
环境:Mac OSX 10.10 + MySQL 5.6、ubuntu 10.04 + MySQL 5.5