From f6d47fe96c22ce4b69fab5a0e90bfb2886a8df9f Mon Sep 17 00:00:00 2001 From: Arnold Bechtoldt Date: Tue, 21 Aug 2012 18:40:38 +0200 Subject: [PATCH] use UTF-8 as charset during mysql connection, refs #1117 Signed-off-by: Arnold Bechtoldt --- lib/classes/database/class.db.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/classes/database/class.db.php b/lib/classes/database/class.db.php index 35930943..915f4d9d 100644 --- a/lib/classes/database/class.db.php +++ b/lib/classes/database/class.db.php @@ -106,7 +106,7 @@ class db if(!$this->link_id) { - //try to connect with no password an change it afterwards. only for root user + //try to connect with no password and change it afterwards. only for root user if($this->user == 'root') { @@ -134,11 +134,8 @@ class db $this->showerror('Trying to use database ' . $this->database . ' failed, exiting'); } } - /* - * this is not for 0.9.x - */ - //mysql_query("SET NAMES utf8", $this->link_id); - //mysql_query("SET CHARACTER SET utf8", $this->link_id); + + mysql_set_charset('utf8', $this->link_id); } /**