diff options
author | Mario <mario@mariovavti.com> | 2022-02-09 09:50:08 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-02-09 09:50:08 +0000 |
commit | 3d318542cb182673b5eeb635916da29267b843c9 (patch) | |
tree | 88e24a6176589c4d56598e25fe07bac653fd6ffc /include/dba/dba_pdo.php | |
parent | 5bdc713afed394db3193a3b55cd8446cf614fb26 (diff) | |
parent | 4a8c3cdc6109c5515824082f57bdb801b13ef9e0 (diff) | |
download | volse-hubzilla-3d318542cb182673b5eeb635916da29267b843c9.tar.gz volse-hubzilla-3d318542cb182673b5eeb635916da29267b843c9.tar.bz2 volse-hubzilla-3d318542cb182673b5eeb635916da29267b843c9.zip |
Merge branch 'dev'
Diffstat (limited to 'include/dba/dba_pdo.php')
-rw-r--r-- | include/dba/dba_pdo.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php index 49f741601..2137ca0cc 100644 --- a/include/dba/dba_pdo.php +++ b/include/dba/dba_pdo.php @@ -27,6 +27,13 @@ class dba_pdo extends dba_driver { $dsn .= ';dbname=' . $db; + if ($this->driver_dbtype === 'mysql') { + $dsn .= ';charset=utf8mb4'; + } + else { + $dsn .= ";options='--client_encoding=UTF8'"; + } + try { $this->db = new PDO($dsn,$user,$pass); $this->db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); |