aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_pdo.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-09 09:50:08 +0000
committerMario <mario@mariovavti.com>2022-02-09 09:50:08 +0000
commit3d318542cb182673b5eeb635916da29267b843c9 (patch)
tree88e24a6176589c4d56598e25fe07bac653fd6ffc /include/dba/dba_pdo.php
parent5bdc713afed394db3193a3b55cd8446cf614fb26 (diff)
parent4a8c3cdc6109c5515824082f57bdb801b13ef9e0 (diff)
downloadvolse-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.php7
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);