From 7a9d61d86013e5cd96ceb3013d215795513a9e7c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Ke=C3=9Fler?= Date: Fri, 18 Nov 2022 13:15:50 +0100 Subject: [PATCH] db collation --- documentation/scientia.sql.txt | 2 +- webroot/api.php | 2 +- webroot/index.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/scientia.sql.txt b/documentation/scientia.sql.txt index 3c1ab73..7792dd0 100644 --- a/documentation/scientia.sql.txt +++ b/documentation/scientia.sql.txt @@ -8,4 +8,4 @@ CREATE TABLE `sc_entry` ( PRIMARY KEY (`ident`) USING BTREE, KEY `date` (`date`), FULLTEXT KEY `words` (`words`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin diff --git a/webroot/api.php b/webroot/api.php index 419668f..0594a27 100644 --- a/webroot/api.php +++ b/webroot/api.php @@ -96,7 +96,7 @@ $DB = false; $DB = new mysqli(DB_HOST, DB_USERNAME,DB_PASSWORD, DB_NAME); if ($DB->connect_errno) exit('Can not connect to MySQL Server'); $DB->set_charset("utf8mb4"); -$DB->query("SET collation_connection = 'utf8mb4_unicode_ci'"); +$DB->query("SET collation_connection = 'utf8mb4_bin'"); $driver = new mysqli_driver(); $driver->report_mode = MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT; diff --git a/webroot/index.php b/webroot/index.php index d29d968..2409bf7 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -60,7 +60,7 @@ $DB = false; $DB = new mysqli(DB_HOST, DB_USERNAME,DB_PASSWORD, DB_NAME); if ($DB->connect_errno) exit('Can not connect to MySQL Server'); $DB->set_charset("utf8mb4"); -$DB->query("SET collation_connection = 'utf8mb4_unicode_ci'"); +$DB->query("SET collation_connection = 'utf8mb4_bin'"); $driver = new mysqli_driver(); $driver->report_mode = MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT; -- 2.39.5