From 85c0db0ccd0dd3e57418c55ba3a843dbaa26fec2 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 25 Feb 2011 16:20:35 +0100 Subject: Set the character set when connecting to mysql We should not rely on the default server setting staying the same forever. Signed-off-by: Florian Pritz Signed-off-by: Lukas Fleischer --- web/lib/aur.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web') diff --git a/web/lib/aur.inc b/web/lib/aur.inc index b59addb..acf6a40 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -220,6 +220,8 @@ function db_connect() { mysql_select_db(AUR_db_name, $handle) or die("Error selecting AUR database: " . mysql_error()); + db_query("SET NAMES 'utf8' COLLATE 'utf8_general_ci';", $handle); + return $handle; } -- cgit v1.2.3-70-g09d2