SQL default encoding: utf8mb4

This commit is contained in:
2026-08-21 09:20:28 +02:00
parent 3342d10737
commit 7032cbea10
2 changed files with 3 additions and 3 deletions

View File

@@ -317,7 +317,7 @@ namespace Documents\Install {
$password = $this->getParameter("password"); $password = $this->getParameter("password");
$database = $this->getParameter("database"); $database = $this->getParameter("database");
$type = $this->getParameter("type"); $type = $this->getParameter("type");
$encoding = $this->getParameter("encoding") ?? "UTF8"; $encoding = $this->getParameter("encoding") ?? "utf8mb4";
$success = true; $success = true;
$missingInputs = []; $missingInputs = [];
@@ -745,7 +745,7 @@ namespace Documents\Install {
]], ]],
[ [
"title" => "Encoding", "name" => "encoding", "type" => "text", "required" => false, "title" => "Encoding", "name" => "encoding", "type" => "text", "required" => false,
"value" => "UTF8" "value" => "utf8mb4"
], ],
] ]
], ],

View File

@@ -67,7 +67,7 @@ class MySQL extends SQL {
return false; return false;
} }
mysqli_set_charset($this->connection, $this->connectionData->getProperty('encoding', 'UTF8')); mysqli_set_charset($this->connection, $this->connectionData->getProperty('encoding', 'utf8mb4'));
return true; return true;
} catch (\Exception $ex) { } catch (\Exception $ex) {
$this->lastError = $this->logger->severe("Failed to connect to MySQL: " . mysqli_connect_error()); $this->lastError = $this->logger->severe("Failed to connect to MySQL: " . mysqli_connect_error());