• Hi,

    When a user leaves a comment with an emoji, only the text is displayed. If the comment has just emojis, it appears empty. Emojis work fine on post title and post content. How do I fix that?

    (Tested on WordPress 5.5.1 and Twentytwenty theme)

    • This topic was modified 3 years, 7 months ago by andypp.
    • This topic was modified 3 years, 7 months ago by andypp.
Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter andypp

    (@andypp)

    I only reactivated Wordfence (a security plugin) just before posting the link to the article, but previous comments were posted with all plugins deactivated, including Wordfence.

    My wp-config says:

    define(‘DB_CHARSET’, ‘utf8’);

    Thanks for your help.

    • This reply was modified 3 years, 6 months ago by andypp.

    Do you have any security or optimization plugins installed that may be sanitizing input from non-authors on your site as an extra precaution?

    Thread Starter andypp

    (@andypp)

    Several tests were performed with no plugins active and emojis in comments are still not working.

    Any idea?

    • This reply was modified 3 years, 6 months ago by andypp.
    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    What is the charset on the _comments table?

    You’ll be able to see that in phpMyAdmin, which you can find in your hosting account’s control panel.

    Thread Starter andypp

    (@andypp)

    It says: utf8_unicode_ci

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    That’s the problem, it needs to be utf8mb4, not just utf8.

    A fresh WordPress installation today should have set that properly.

    There are some steps to fix that at https://pento.net/2014/04/07/wordpress-and-utf-8/

    But, do make a backup first: https://wordpress.org/support/article/wordpress-backups/

    Thread Starter andypp

    (@andypp)

    Thank you for your help and for the links! It doesn’t sound like fun but I’ll try.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Emojis do not appear in comments’ is closed to new replies.