aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/database.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r--engine/lib/database.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php
index fa3a91fbb..ff74c3655 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -56,6 +56,9 @@
if (!mysql_select_db($CONFIG->dbname, $dblink[$dblinkname]))
throw new DatabaseException(sprintf(elgg_echo('DatabaseException:NoConnect'), $CONFIG->dbname));
+ // Set DB for UTF8
+ mysql_query("SET NAMES utf8");
+
// Set up cache
if ((!$DB_QUERY_CACHE) && (!$CONFIG->db_disable_query_cache))
$DB_QUERY_CACHE = new ElggStaticVariableCache('db_query_cache'); //array();
@@ -651,4 +654,4 @@
register_elgg_event_handler('boot','system','init_db',0);
-?> \ No newline at end of file
+?>