diff options
author | Florian Pritz <bluewind@server-speed.net> | 2011-02-25 16:20:35 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-02-27 19:46:30 +0100 |
commit | 85c0db0ccd0dd3e57418c55ba3a843dbaa26fec2 (patch) | |
tree | ab477d3144a10c03108d339888a8b340c842dd2f | |
parent | 816a0cf8d7b2365d38699b72322c785b338350f1 (diff) | |
download | aurweb-85c0db0ccd0dd3e57418c55ba3a843dbaa26fec2.tar.xz |
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>
-rw-r--r-- | web/lib/aur.inc | 2 |
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; } |