Steffen
Well-known member
- Affected version
- 2.0.0
The importer does not use the $config['fullUnicode'] variable to possibly initialize the "XF\Import\DataManager" class with $fullUnicode = true. Therefore the "DataManager::convertToUtf8" method strips all 4-byte Unicode characters from private messages, postings etc.
I think the the fix is as follows:
(I'm not sure whether vB4 officially supports utf8mb4, we might have patched that in the past. But I think the patch cannot do any harm.)
I think the the fix is as follows:
Code:
diff --git a/xenforo/src/XF/Import/Manager.php b/htdocs/xenforo/src/XF/Import/Manager.php
--- a/xenforo/src/XF/Import/Manager.php
+++ b/xenforo/src/XF/Import/Manager.php
@@ -240,7 +240,7 @@ class Manager
}
$log = $this->getLog($session->logTable);
- $dataManager = new DataManager($this->app, $log, $session->retainIds);
+ $dataManager = new DataManager($this->app, $log, $session->retainIds, $this->app->config('fullUnicode'));
$importer->initialize($session, $dataManager, $session->baseConfig);
(I'm not sure whether vB4 officially supports utf8mb4, we might have patched that in the past. But I think the patch cannot do any harm.)