From 7d67bd87ac63cedee2708d46c2461b4e2449516d Mon Sep 17 00:00:00 2001 From: PeterLaemmle Date: Sun, 29 Dec 2019 12:40:56 +0100 Subject: [PATCH] Update mysql.class.php Full UTF-8 support. Update MySQL plugin and web UI to allow storage and display of emojis. --- exampleAddOns/simpleWeb/mysql.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exampleAddOns/simpleWeb/mysql.class.php b/exampleAddOns/simpleWeb/mysql.class.php index a74b4b6..8aa1445 100644 --- a/exampleAddOns/simpleWeb/mysql.class.php +++ b/exampleAddOns/simpleWeb/mysql.class.php @@ -35,6 +35,10 @@ Simple Database Class (C) by Bastian Schroll $this->error("Datenbank nicht gefunden!", mysqli_error($this->conn)); return false; } + + /* Set character set for database connection to utf8mb4 */ + mysqli_query($this->conn, "SET NAMES 'utf8mb4'"); + return true; }