summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/pdo_driver.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2011-10-21 10:45:28 +0200
committerTimothy Warren <tim@timshomepage.net>2011-10-21 10:45:28 +0200
commitd1a5ba2678c88e507d05b6d0235ee91b4b4db311 (patch)
tree6a012057e4f1aa34fa9074c77d571233b1ac1611 /system/database/drivers/pdo/pdo_driver.php
parentc73c1c08e5ffc93b098c65d518ff8e60426e5f3e (diff)
Fix mysql charset bug
Diffstat (limited to 'system/database/drivers/pdo/pdo_driver.php')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php26
1 files changed, 22 insertions, 4 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index 19e069b06..98fffa021 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -4,10 +4,22 @@
*
* An open source application development framework for PHP 5.1.6 or newer
*
+ * NOTICE OF LICENSE
+ *
+ * Licensed under the Open Software License version 3.0
+ *
+ * This source file is subject to the Open Software License (OSL 3.0) that is
+ * bundled with this package in the files license.txt / license.rst. It is
+ * also available through the world wide web at this URL:
+ * http://opensource.org/licenses/OSL-3.0
+ * If you did not receive a copy of the license and are unable to obtain it
+ * through the world wide web, please send an email to
+ * licensing@ellislab.com so we can send you a copy immediately.
+ *
* @package CodeIgniter
- * @author ExpressionEngine Dev Team
- * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
- * @license http://codeigniter.com/user_guide/license.html
+ * @author EllisLab Dev Team
+ * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. (http://ellislab.com/)
+ * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link http://codeigniter.com
* @since Version 2.1.0
* @filesource
@@ -25,7 +37,7 @@
* @package CodeIgniter
* @subpackage Drivers
* @category Database
- * @author ExpressionEngine Dev Team
+ * @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/database/
*/
class CI_DB_pdo_driver extends CI_DB {
@@ -56,6 +68,9 @@ class CI_DB_pdo_driver extends CI_DB {
{
$this->_like_escape_str = '';
$this->_like_escape_chr = '';
+
+ //Set the charset with the connection string
+ $this->hostname .= ";charset=" . $this->char_set;
}
else if (strpos($this->hostname, 'odbc') !== FALSE)
{
@@ -69,6 +84,9 @@ class CI_DB_pdo_driver extends CI_DB {
}
$this->hostname = $this->hostname . ";dbname=".$this->database;
+
+
+
$this->trans_enabled = FALSE;
$this->_random_keyword = ' RND('.time().')'; // database specific random keyword