summaryrefslogtreecommitdiffstats
path: root/lib/private/DB/MDB2SchemaWriter.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/MDB2SchemaWriter.php')
-rw-r--r--lib/private/DB/MDB2SchemaWriter.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/DB/MDB2SchemaWriter.php b/lib/private/DB/MDB2SchemaWriter.php
index 26e32b036fe..7664b4359ab 100644
--- a/lib/private/DB/MDB2SchemaWriter.php
+++ b/lib/private/DB/MDB2SchemaWriter.php
@@ -43,7 +43,11 @@ class MDB2SchemaWriter {
$xml->addChild('name', $config->getSystemValue('dbname', 'owncloud'));
$xml->addChild('create', 'true');
$xml->addChild('overwrite', 'false');
- $xml->addChild('charset', 'utf8');
+ if($config->getSystemValue('dbtype', 'sqlite') === 'mysql' && $config->getSystemValue('mysql.utf8mb4', false)) {
+ $xml->addChild('charset', 'utf8mb4');
+ } else {
+ $xml->addChild('charset', 'utf8');
+ }
// FIX ME: bloody work around
if ($config->getSystemValue('dbtype', 'sqlite') === 'oci') {