Browse Source

added note about Oracle DB connection charset

close #11387
tags/2.0.9
Carsten Brandt 8 years ago
parent
commit
bcc19e97cb
  1. 9
      framework/db/Connection.php

9
framework/db/Connection.php

@ -238,10 +238,13 @@ class Connection extends Component
/**
* @var string the charset used for database connection. The property is only used
* for MySQL, PostgreSQL and CUBRID databases. Defaults to null, meaning using default charset
* as specified by the database.
* as configured by the database.
*
* Note that if you're using GBK or BIG5 then it's highly recommended to
* specify charset via DSN like 'mysql:dbname=mydatabase;host=127.0.0.1;charset=GBK;'.
* For Oracle Database, the charset must be specified in the [[dsn]], for example for UTF-8 by appending `;charset=UTF-8`
* to the DSN string.
*
* The same applies for if you're using GBK or BIG5 charset with MySQL, then it's highly recommended to
* specify charset via [[dsn]] like `'mysql:dbname=mydatabase;host=127.0.0.1;charset=GBK;'`.
*/
public $charset;
/**

Loading…
Cancel
Save