From aee82ad342b8fad9fb2040cef5457a7273313770 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 26 Jul 2021 16:37:11 +0200 Subject: [PATCH] Database: Always use `utf8mb4` as connection charset --- library/Icinga/Common/Database.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/Icinga/Common/Database.php b/library/Icinga/Common/Database.php index 32d21153f..fbe1e0260 100644 --- a/library/Icinga/Common/Database.php +++ b/library/Icinga/Common/Database.php @@ -31,6 +31,7 @@ trait Database $config = new SqlConfig(ResourceFactory::getResourceConfig( IcingaConfig::app()->get('global', 'config_resource') )); + $config->charset = 'utf8mb4'; $config->options = [PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ]; if ($config->db === 'mysql') {