Elise主题1.3.0更新后支持在评论区使用emoji,但是使用后却产生了下面的错误:
Typecho数据库是默认了utf8mb4_general_ci
,但是utf8mb4_general_ci
不支持emoji,正好utf8mb4_unicode_ci
支持,且完全兼容utf8mb4_general_ci
在typecho对应的数据库内执行以下参数:
alter table typecho_comments convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_contents convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_fields convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_metas convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_options convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_relationships convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_users convert to character set utf8mb4 collate utf8mb4_unicode_ci;
执行完后再将typecho配置文件config.inc.php
内的charset
设置为utf8mb4
,保存后即可使用emoji?