aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_pdo.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-10 18:57:44 +0000
committerMario <mario@mariovavti.com>2022-02-10 18:57:44 +0000
commit35877b13825b2c3db44ff89977344b84f8e21d9a (patch)
tree4354a09a1f603d46d62ea7b9c9c0e49adea3e319 /include/dba/dba_pdo.php
parentc5312871704631b64afb3a146fc52b14949e7ee5 (diff)
downloadvolse-hubzilla-35877b13825b2c3db44ff89977344b84f8e21d9a.tar.gz
volse-hubzilla-35877b13825b2c3db44ff89977344b84f8e21d9a.tar.bz2
volse-hubzilla-35877b13825b2c3db44ff89977344b84f8e21d9a.zip
allow to override the DB charset via the $db_charset variable in .htconfig.php
Diffstat (limited to 'include/dba/dba_pdo.php')
-rw-r--r--include/dba/dba_pdo.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php
index 2137ca0cc..c8a1b6c85 100644
--- a/include/dba/dba_pdo.php
+++ b/include/dba/dba_pdo.php
@@ -14,7 +14,7 @@ class dba_pdo extends dba_driver {
* {@inheritDoc}
* @see dba_driver::connect()
*/
- function connect($server, $scheme, $port, $user, $pass, $db) {
+ function connect($server, $scheme, $port, $user, $pass, $db, $db_charset) {
$this->driver_dbtype = $scheme;
@@ -28,10 +28,10 @@ class dba_pdo extends dba_driver {
$dsn .= ';dbname=' . $db;
if ($this->driver_dbtype === 'mysql') {
- $dsn .= ';charset=utf8mb4';
+ $dsn .= ';charset=' . $db_charset;
}
else {
- $dsn .= ";options='--client_encoding=UTF8'";
+ $dsn .= ";options='--client_encoding=" . $db_charset . "'";
}
try {