This module helps in preventing PDO Exceptions caused by MySQL general error of incorrect string value. Enabling this module will have your site reject overly long 2 byte sequences, as well as characters above U+10000, and reject overly long 3 byte sequences and UTF-16.

This is a workaround fix for a long time issue: #1314214: MySQL driver does not support full UTF-8 (emojis, asian symbols, mathematical symbols)

The original issue was concerned with data being lost or corrupted by using character sets for MySQL which are not properly supported.

Drupal will always instruct MySQL to create UTF-8 tables, but by default, UTF-8 in MySQL doesn't cover the entire UTF-8
https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8.html

Are you getting this error in your site?

The error log message we get is as the following
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x94\xB4\x0D\x0A...'

This is a MySQL compatibility issue where exceptions are thrown when we do have some weird characters.

This module is developed by Vardot.

Vardot

Supporting organizations: 

Project information

Releases