From d83a75125e0a63746ef426f47fa3fae5124cc642 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 21 Sep 2008 15:27:20 +0000 Subject: - Patch #310447 by Damien Tournoud, Crell, catch: add back SET NAMES='utf8' -- we love UTF-8 --- includes/database/mysql/database.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'includes') diff --git a/includes/database/mysql/database.inc b/includes/database/mysql/database.inc index a61fa9d9a..26fe17247 100644 --- a/includes/database/mysql/database.inc +++ b/includes/database/mysql/database.inc @@ -30,6 +30,12 @@ class DatabaseConnection_mysql extends DatabaseConnection { // Because MySQL's prepared statements skip the query cache, because it's dumb. PDO::ATTR_EMULATE_PREPARES => TRUE, )); + + // Force MySQL to use the UTF-8 character set by default. + $this->exec('SET NAMES "utf8"'); + + // Enable MySQL's "strict mode", which removes most of MySQL's + // "just be lazy" behaviors that end up causing more trouble than they're worth. $this->exec('SET sql_mode=STRICT_ALL_TABLES'); } -- cgit v1.2.3