From be9c0609aefca3938e9d8ddbf0ad5137e0e85dc3 Mon Sep 17 00:00:00 2001 From: Admin Date: Tue, 20 Oct 2026 17:10:57 +0200 Subject: [PATCH] . --- sql.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql.php b/sql.php index d7a3229..ec6df68 100644 --- a/sql.php +++ b/sql.php @@ -22,6 +22,12 @@ class SQL { if ($this->h->connect_errno) { return false; } + // Keep prepared statement parameters and text columns on the same UTF-8 + // encoding. Without this, valid UTF-8 input can be rejected by utf8mb4 + // columns depending on the server's connection default. + if (! $this->h->set_charset ( 'utf8mb4' )) { + return false; + } return true; } public function get(string $que, string $t = '', mixed $p = array ()): array|false {