summaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@server-speed.net>2011-02-25 16:20:35 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-02-27 19:46:30 +0100
commit85c0db0ccd0dd3e57418c55ba3a843dbaa26fec2 (patch)
treeab477d3144a10c03108d339888a8b340c842dd2f /web/lib
parent816a0cf8d7b2365d38699b72322c785b338350f1 (diff)
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 <bluewind@server-speed.net> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/aur.inc2
1 files changed, 2 insertions, 0 deletions
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;
}