Support » Plugin: Contact Form Submissions » Export: Warning: mb_convert_encoding()

  • Resolved xdelfino


    Hi, into file csv no field data only:

    <br />
    <b>Warning</b>: mb_convert_encoding(): Unknown encoding "utf8mb4" in <b>/homepages

    … can you help me?

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m having a similar issue.

    Warning: mb_convert_encoding(): Unknown encoding “utf8mb4” in ../wp-content/plugins/contact-form-submissions/Admin.php on line 481

    I need help with this as well, please. 🙂

    • This reply was modified 1 year, 9 months ago by  inkt.


    I have Version: 1.6.1 installed and I was able to fix my error by replacing line 481 in the file listed below;


    Original code on line 481 –
    $values[$key] = mb_convert_encoding($value, DB_CHARSET);

    REPLACED with –
    $values[$key] = mb_convert_encoding(sanitize_text_field($value), 'UTF-16LE');

    Hopefully this works for you and others with this new bug. Would be great to see an official update for the plugin.

    good luck

    Plugin Author jasongreen



    If there’s a fix for everyone I will certainly release an update to fix the warning.

    Can you confirm the value of DB_CHARSET defined in wp-config.php. It’s usually utf8 but given the warning it looks like you’re both using utf8mb4?

    I confirm my value is: define(‘DB_CHARSET’, ‘utf8mb4’);
    At the moment, I force in admin.php the value “utf8” instead of DB_CHARSET so i can export …
    waiting for the update asap.
    thank you

    Hi! im having the same issue
    i get the csv file with this:
    <br />
    <b>Warning</b>: mb_convert_encoding(): Unknown encoding &quot utf8mb4&quot in <b>/www/</b> on line <b>481</b><br />

    I am using the same plugin in another site, and it works perfectly but in the other site, i get this error.
    What can i do?


    I can confirm also my value is: define(‘DB_CHARSET’, ‘utf8mb4’);

    Plugin Author jasongreen



    Before I release another update can you please edit the following two lines and confirm if it fixes your problem.

    Admin.php replace line 483:
    $values[$key] = mb_convert_encoding($value, ‘utf8’);

    Admin.php replace line 504
    $values[$keyFile] = mb_convert_encoding(implode(‘,’, $files), ‘utf8’);



    No, it still won’t work,
    i get the same error.

    I didn’t try to deactivate it or even uninstall it and then get it again, cause i’m afraid i will lose all the submissions i got so far.

    Is there any way to back that information up?

    • This reply was modified 1 year, 9 months ago by  algonzalez.

    Thanks @inkt

    Worked for me!

    Thanks @inkt
    Worked for me too

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Export: Warning: mb_convert_encoding()’ is closed to new replies.