diff --git a/doc/changelog.md b/doc/changelog.md index 83e974217..182ebba60 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -1,5 +1,10 @@ # v0.14.3 -> v0.14.4 + +## Enhancements + +- Use utf8mb4 as default encoding in order to support the full unicode range + ## Bugfixes - Fixed a bug where creating a new preprocessor would copy the configured limit command over the configured skip command diff --git a/src/dba/AbstractModelFactory.class.php b/src/dba/AbstractModelFactory.class.php index c6c596e84..249ede9e8 100755 --- a/src/dba/AbstractModelFactory.class.php +++ b/src/dba/AbstractModelFactory.class.php @@ -855,7 +855,9 @@ public function getDB($test = false) { } else { global $CONN; - $dsn = 'mysql:dbname=' . $CONN['db'] . ";host=" . $CONN['server'] . ";port=" . $CONN['port'] . ";charset=utf8"; + // The utf8mb4 is here to force php to connect with that encoding, so you can save emoji's or other non ascii chars (specifically, unicode characters outside of the BMP) into the database. + // If you are running into issues with this line, we could make this configurable. + $dsn = 'mysql:dbname=' . $CONN['db'] . ";host=" . $CONN['server'] . ";port=" . $CONN['port'] . ";charset=utf8mb4"; $user = $CONN['user']; $password = $CONN['pass']; }