Topic 1 Posts

web

Enable emojis in Aegea

This blog was running on the beautiful Aegea. But in the latest version (Version 2.7, build 3254) at the time it lacked one feature we can't imagine our life today - emojis 🙂

When you try creating or updating a post with some nice 👻 they will be both shown and saved to the database as '?' (question marks).

Until there is an official fix, here's a hacky solution. I spent a whole day going through obfuscated code, so you won't have to. 🙂
In core.php apply these changes:

  1. Change
    >$w8e815='utf8';
  • to
    $w8e815='utf8mb4';
  1. And remove this line:
    $e1cb25=rff7c($e1cb25);

If the changes above won't help, try adding this in /etc/mysql/my.cnf and restarting mysql:

[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

[mysqld]
character_set_server=utf8mb4
collation_server=utf8mb4_unicode_ci

In case you're wondering on which stack this does work - I'm on php 7.0, nginx 1.10.3, mysql 5.7.22, ubuntu 16.04.

Happy blogging! 😎