From: Johannes Keßler Date: Fri, 18 Nov 2022 12:15:50 +0000 (+0100) Subject: db collation X-Git-Tag: 1.1~21 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=7a9d61d86013e5cd96ceb3013d215795513a9e7c;p=scientia.git db collation --- 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;