From 1f7224c6019be5871f8385c6bb4403fd6ea28563 Mon Sep 17 00:00:00 2001 From: David M Date: Sun, 3 Dec 2006 16:43:18 +0000 Subject: [PATCH] only works if you do it _before_ the connect :P git-svn-id: file:///svn/phpbb/trunk@6704 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/mssql.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index 037cef81bf..42ddb1a17a 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -35,6 +35,11 @@ class dbal_mssql extends dbal $this->server = $sqlserver . (($port) ? ':' . $port : ''); $this->dbname = $database; + if (ini_get('mssql.charset')) + { + ini_set('mssql.charset', 'UTF-8'); + } + $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword); if ($this->db_connect_id && $this->dbname != '') @@ -46,11 +51,6 @@ class dbal_mssql extends dbal } } - if (ini_get('mssql.charset')) - { - ini_set('mssql.charset', 'UTF-8'); - } - return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error(''); }