diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-07 21:44:27 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-07 21:44:27 +0000 |
commit | d1acf00b8b8ca67e1ba1855041a55b7ee6d7db74 (patch) | |
tree | f795ca153a5e25952fd2564f3da0ad77b894fe57 /engine/lib/database.php | |
parent | fc11e5260309702e3301837e3725fe8084b61a4e (diff) | |
download | elgg-d1acf00b8b8ca67e1ba1855041a55b7ee6d7db74.tar.gz elgg-d1acf00b8b8ca67e1ba1855041a55b7ee6d7db74.tar.bz2 |
Fixes #1181: UTF8 now correctly stored in database.
git-svn-id: http://code.elgg.org/elgg/trunk@3514 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r-- | engine/lib/database.php | 5 |
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 +?> |