From 3abd7f943f3545ac6b9c164e8697e1033cf655f1 Mon Sep 17 00:00:00 2001 From: Imran Hussain <imranh@sucs.org> Date: Thu, 5 Mar 2015 12:32:00 +0000 Subject: [PATCH] SetCharSet('utf8') on the db conns --- components/motd_wrapper.php | 3 --- htdocs/index.php | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/motd_wrapper.php b/components/motd_wrapper.php index 602a148..84fd872 100644 --- a/components/motd_wrapper.php +++ b/components/motd_wrapper.php @@ -1,7 +1,4 @@ <?PHP require("/var/www/sucssite/htdocs/settings.php"); -require("/usr/share/php/adodb/adodb.inc.php"); - -$DB->SetCharSet('utf8'); include($base."components/motd.php"); diff --git a/htdocs/index.php b/htdocs/index.php index 1cdc92a..d8fea53 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -41,11 +41,13 @@ $smarty->assign("baseurl", $baseurl); require("/usr/share/php/adodb/adodb.inc.php"); $DB = NewADOConnection('postgres9'); $DB->Connect('dbname='.$dbname.' user='.$dbuser); +$DB->SetCharSet('utf8'); $DB->SetFetchMode(ADODB_FETCH_ASSOC); // Initialise the sucs database conn $sucsDB = NewADOConnection('postgres9'); $sucsDB->Connect('dbname='.$sucsdbname.' user='.$dbuser); +$sucsDB->SetCharSet('utf8'); $sucsDB->SetFetchMode(ADODB_FETCH_ASSOC); // Include the session library -- GitLab