diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-11-19 10:14:23 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-11-19 10:14:23 +0100 |
commit | 4173fa05a067395e3bf8d5b5f3dedb8af59d3fa1 (patch) | |
tree | dc5854814855b44221462734a00e44fa3b7bbccc | |
parent | a00f90c2973111f0d95ac129eba967e8269ea0d6 (diff) |
Add db_set_charset() support for the mssql driver
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 13 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index faa1e260d..d3e439d69 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -298,6 +298,19 @@ class CI_DB_mssql_driver extends CI_DB { // -------------------------------------------------------------------- /** + * Set client character set + * + * @param string $charset + * @return bool + */ + protected function _db_set_charset($charset) + { + return (@ini_set('mssql.charset', $charset) !== FALSE); + } + + // -------------------------------------------------------------------- + + /** * Version number query string * * @return string diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 98a4a42b8..9ca01d83f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -157,6 +157,7 @@ Release Date: Not Released - Added escaping with *QUOTE_IDENTIFIER* setting detection. - Added port handling support for UNIX-based systems (MSSQL driver). - Added *OFFSET* support for SQL Server 2005 and above. + - Added ``db_set_charset()`` support (MSSQL driver). - Improved support of the Oracle (OCI8) driver, including: - Added DSN string support (Easy Connect and TNS). - Added support for ``drop_table()`` in :doc:`Database Forge <database/forge>`. |