From 7032cbea10f46a0328a4871a2711cfe64f0fc350 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 21 Aug 2026 09:20:28 +0200 Subject: [PATCH] SQL default encoding: utf8mb4 --- Core/Documents/Install.class.php | 4 ++-- Core/Driver/SQL/MySQL.class.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Documents/Install.class.php b/Core/Documents/Install.class.php index bcc5a51..2ef0621 100644 --- a/Core/Documents/Install.class.php +++ b/Core/Documents/Install.class.php @@ -317,7 +317,7 @@ namespace Documents\Install { $password = $this->getParameter("password"); $database = $this->getParameter("database"); $type = $this->getParameter("type"); - $encoding = $this->getParameter("encoding") ?? "UTF8"; + $encoding = $this->getParameter("encoding") ?? "utf8mb4"; $success = true; $missingInputs = []; @@ -745,7 +745,7 @@ namespace Documents\Install { ]], [ "title" => "Encoding", "name" => "encoding", "type" => "text", "required" => false, - "value" => "UTF8" + "value" => "utf8mb4" ], ] ], diff --git a/Core/Driver/SQL/MySQL.class.php b/Core/Driver/SQL/MySQL.class.php index de46b27..bd33fdd 100644 --- a/Core/Driver/SQL/MySQL.class.php +++ b/Core/Driver/SQL/MySQL.class.php @@ -67,7 +67,7 @@ class MySQL extends SQL { return false; } - mysqli_set_charset($this->connection, $this->connectionData->getProperty('encoding', 'UTF8')); + mysqli_set_charset($this->connection, $this->connectionData->getProperty('encoding', 'utf8mb4')); return true; } catch (\Exception $ex) { $this->lastError = $this->logger->severe("Failed to connect to MySQL: " . mysqli_connect_error());