昨天??写的一篇文章,手贱弄了几个Emoji表情包上去,结果显示提交成功,文章 全 没 了?
查阅了一番,还以为是Typecho不支持Emoji,结果发现,原来是这个数据库啊,每个字符3字节,而Emoji4字节,导致提交失败,就爆了...
我的惨痛教训,让我登上数据库,改成了utf8mb4
如果原来是utf8,可以直接转换,大致方法:
连接上typecho数据库,执行如下命令:
alter table typecho_comments convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_contents convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_fields convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_metas convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_options convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_relationships convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_users convert to character set utf8mb4 collate utf8mb4_general_ci;
Comments | NOTHING