При попытке вставить эмотикон в таблицу mariadb ругается на поле text1:
MySQL answer: Incorrect string value: '\xF0\x9F\x98\x80' for column `my_db`.`pages`.`text_1` at row 1.
При этом структура таблицы pages:
| pages | CREATE TABLE `pages` (
`id` int(10) unsigned NOT NULL,
`ng_id` int(5) unsigned NOT NULL,
`text_1` text COLLATE utf8mb4_unicode_ci NOT NULL,
`text_2` text COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'NOT NULL',
`img_text` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`enabled` tinyint(1) unsigned NOT NULL DEFAULT 1,
PRIMARY KEY (`id`,`ng_id`),
KEY `fk_ng_id` (`ng_id`),
CONSTRAINT `pages_ibfk_1` FOREIGN KEY (`id`) REFERENCES `pages_blocks` (`id`) ON DELETE CASCADE,
CONSTRAINT `pages_ibfk_2` FOREIGN KEY (`ng_id`) REFERENCES `languages` (`ng_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
В настройках mariadb указано использовать utf8mb4:
> show variables WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_unicode_ci |
| collation_database | utf8mb4_unicode_ci |
| collation_server | utf8mb4_unicode_ci |
+--------------------------+--------------------+
10 rows in set (0.002 sec)
Чего еще не хватает для корректной работы с эмотиконами в БД?