]>
Commit | Line | Data |
---|---|---|
a9672aa6 ER |
1 | Index: Zend/Db/Adapter/Mysqli.php |
2 | =================================================================== | |
3 | --- Zend/Db/Adapter/Mysqli.php (revision 11422) | |
4 | +++ Zend/Db/Adapter/Mysqli.php (working copy) | |
5 | @@ -313,6 +313,10 @@ | |
6 | require_once 'Zend/Db/Adapter/Mysqli/Exception.php'; | |
7 | throw new Zend_Db_Adapter_Mysqli_Exception(mysqli_connect_error()); | |
8 | } | |
9 | + | |
10 | + if(array_key_exists('charset', $this->_config)) { | |
11 | + $this->_connection->set_charset($this->_config['charset']); | |
12 | + } | |
13 | } | |
14 | ||
15 | /** | |
16 | Index: Zend/Db/Adapter/Pdo/Mysql.php | |
17 | =================================================================== | |
18 | --- Zend/Db/Adapter/Pdo/Mysql.php (revision 11422) | |
19 | +++ Zend/Db/Adapter/Pdo/Mysql.php (working copy) | |
20 | @@ -93,6 +93,20 @@ | |
21 | { | |
22 | return $this->fetchCol('SHOW TABLES'); | |
23 | } | |
24 | + | |
25 | + /** | |
26 | + * @return void | |
27 | + */ | |
28 | + protected function _connect() | |
29 | + { | |
30 | + if ($this->_connection) { | |
31 | + return; | |
32 | + } | |
33 | + parent::_connect(); | |
34 | + if (array_key_exists('charset', $this->_config)) { | |
35 | + $this->_connection->exec('SET NAMES ' . $this->_quote($this->_config['charset'])); | |
36 | + } | |
37 | + } | |
38 | ||
39 | /** | |
40 | * Returns the column descriptions for a table. | |
41 | Index: Zend/Db/Adapter/Pdo/Pgsql.php | |
42 | =================================================================== | |
43 | --- Zend/Db/Adapter/Pdo/Pgsql.php (revision 11422) | |
44 | +++ Zend/Db/Adapter/Pdo/Pgsql.php (working copy) | |
45 | @@ -71,6 +71,20 @@ | |
46 | 'NUMERIC' => Zend_Db::FLOAT_TYPE, | |
47 | 'REAL' => Zend_Db::FLOAT_TYPE | |
48 | ); | |
49 | + | |
50 | + /** | |
51 | + * @return void | |
52 | + */ | |
53 | + protected function _connect() | |
54 | + { | |
55 | + if ($this->_connection) { | |
56 | + return; | |
57 | + } | |
58 | + parent::_connect(); | |
59 | + if (array_key_exists('charset', $this->_config)) { | |
60 | + $this->_connection->exec('SET NAMES ' . $this->_quote($this->_config['charset'])); | |
61 | + } | |
62 | + } | |
63 | ||
64 | /** | |
65 | * Returns a list of the tables in the database. |