db\Connection $charset

$charset public property

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 configured by the database.

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 string $charset = null
doc_Yii
2016-10-30 16:57:33
Comments
Leave a Comment

Please login to continue.