mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
ENHANCEMENT: Switch MSSQL to use the utf8 character set for the connection.
This commit is contained in:
parent
8e28fc70f6
commit
07ea9353e1
@ -100,6 +100,8 @@ class MSSQLDatabase extends SS_Database {
|
||||
}
|
||||
|
||||
if($this->mssql) {
|
||||
// Switch to utf8 connection charset
|
||||
ini_set('mssql.charset', 'utf8');
|
||||
$this->dbConn = mssql_connect($parameters['server'], $parameters['username'], $parameters['password'], true);
|
||||
} else {
|
||||
// Disable default warnings as errors behaviour for sqlsrv to keep it in line with mssql functions
|
||||
@ -114,6 +116,7 @@ class MSSQLDatabase extends SS_Database {
|
||||
$connectionInfo = array(
|
||||
'UID' => $parameters['username'],
|
||||
'PWD' => $parameters['password'],
|
||||
'CharacterSet' => 'utf8',
|
||||
);
|
||||
}
|
||||
$this->dbConn = sqlsrv_connect($parameters['server'], $connectionInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user