Forum
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?
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.
Ok, I think you should have utf8mb4 available in both, so that might be the best way forward.
In your
config.php
file, addand then switch your
perch2_blog_posts
table and thepostHTML
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