Steffen
Well-known member
We have to count characters instead of bytes.
Diff:
diff --git a/src/addons/XFI/Import/Importer/vBulletin.php b/src/addons/XFI/Import/Importer/vBulletin.php
index c7f7c3485..810d7371e 100644
--- a/src/addons/XFI/Import/Importer/vBulletin.php
+++ b/src/addons/XFI/Import/Importer/vBulletin.php
@@ -4054,8 +4054,8 @@ class vBulletin extends AbstractForumImporter
$titleRegex = '/^(' . implode('|', $replyPrefixes) . ')?(\s*)?.*/i';
if (preg_match($titleRegex, $title, $matches))
{
- $trimLen = $titleMaxChars - (strlen($matches[1]) + strlen($matches[2]));
- $threadTitle = rtrim(substr($threadTitle, 0, $trimLen));
+ $trimLen = $titleMaxChars - (mb_strlen($matches[1]) + mb_strlen($matches[2]));
+ $threadTitle = rtrim(mb_substr($threadTitle, 0, $trimLen));
if ($title !== ($matches[1] . $matches[2] . $threadTitle))
{