We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Problem

Issue with emoji clobbering posts

Currently if you post an emoji in the middle of a blog post (using markitup) with the Chrome inbuilt emoji keyboard, it clobbers the emoji and everything after it when you save.

Oddly, you can use the decimal unicode to insert the emoji to the page and it will work and not kill off everything after it, but if you load the page again to edit it, the browser loads the emoji (chrome and firefox) rather than the code in markdown and then next time you save, you kill off the emoji and everything after it again.

Is there something I can do about that or is that a markitup issue?

Jana Hoffmann

Jana Hoffmann 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It could be your database encoding. Which version of MySQL are you using? Do you have the utf8mb4 encoding available?

The live server is version 5.6.30, utf8_general_ci but my local Mamp is 5.5.34, utf8mb4_unicode_ci and I have the same issue on both.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, I think you should have utf8mb4 available in both, so that might be the best way forward.

In your config.php file, add

define('PERCH_DB_CHARSET', 'utf8mb4');

and then switch your perch2_blog_posts table and the postHTML column to use utf8mb4 encoding.

Perch itself should be fully unicode compliant the whole way through, so as long as the data is being stored and retrieved from the database with the correct encoding then everything else should be fine.

Thanks Drew, works perfectly now! :D