|
|
@@ -62,6 +62,9 @@ class Mysql extends \Cake\Database\Driver
|
|
|
if (!empty($config['timezone'])) {
|
|
|
$config['init'][] = sprintf("SET time_zone = '%s'", $config['timezone']);
|
|
|
}
|
|
|
+ if (!empty($config['encoding'])) {
|
|
|
+ $config['init'][] = sprintf("SET NAMES %s", $config['encoding']);
|
|
|
+ }
|
|
|
|
|
|
$config['flags'] += [
|
|
|
PDO::ATTR_PERSISTENT => $config['persistent'],
|