Index: Scribus/scribus/plugins/import/pdf/importpdf.cpp
===================================================================
--- Scribus/scribus/plugins/import/pdf/importpdf.cpp	(revision 27039)
+++ Scribus/scribus/plugins/import/pdf/importpdf.cpp	(revision 27042)
@@ -874,6 +874,44 @@
 
 QString PdfPlug::UnicodeParsedString(const GooString *s1)
 {
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 10, 0)
+	if (!s1 || s1->size() == 0)
+		return QString();
+	bool isUnicode;
+	int i;
+	Unicode u;
+	QString result;
+	if ((s1->getChar(0) & 0xff) == 0xfe && (s1->size() > 1 && (s1->getChar(1) & 0xff) == 0xff))
+	{
+		isUnicode = true;
+		i = 2;
+		result.reserve((s1->size() - 2) / 2);
+	}
+	else
+	{
+		isUnicode = false;
+		i = 0;
+		result.reserve(s1->size());
+	}
+	while (i < s1->size())
+	{
+		if (isUnicode)
+		{
+			u = ((s1->getChar(i) & 0xff) << 8) | (s1->getChar(i + 1) & 0xff);
+			i += 2;
+		}
+		else
+		{
+			u = s1->getChar(i) & 0xff;
+			++i;
+		}
+		// #15616: imagemagick may write unicode strings incorrectly in PDF
+		if (u == 0)
+			continue;
+		result += QChar(u);
+	}
+	return result;
+#else
 	if (!s1 || s1->getLength() == 0)
 		return QString();
 	bool isUnicode;
@@ -910,6 +948,7 @@
 		result += QChar( u );
 	}
 	return result;
+#endif
 }
 
 QString PdfPlug::UnicodeParsedString(const std::string& s1)
Index: Scribus/scribus/plugins/import/pdf/slaoutput.cpp
===================================================================
--- Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(revision 27039)
+++ Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(revision 27042)
@@ -3883,6 +3883,41 @@
 
 QString SlaOutputDev::UnicodeParsedString(const GooString *s1) const
 {
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 10, 0)
+	if (!s1 || s1->size() == 0)
+		return QString();
+	bool isUnicode;
+	int i;
+	Unicode u;
+	QString result;
+	if ((s1->getChar(0) & 0xff) == 0xfe && (s1->size() > 1 && (s1->getChar(1) & 0xff) == 0xff))
+	{
+		isUnicode = true;
+		i = 2;
+		result.reserve((s1->size() - 2) / 2);
+	}
+	else
+	{
+		isUnicode = false;
+		i = 0;
+		result.reserve(s1->size());
+	}
+	while (i < s1->size())
+	{
+		if (isUnicode)
+		{
+			u = ((s1->getChar(i) & 0xff) << 8) | (s1->getChar(i + 1) & 0xff);
+			i += 2;
+		}
+		else
+		{
+			u = s1->getChar(i) & 0xff;
+			++i;
+		}
+		result += QChar(u);
+	}
+	return result;
+#else
 	if (!s1 || s1->getLength() == 0)
 		return QString();
 	bool isUnicode;
@@ -3916,6 +3951,7 @@
 		result += QChar( u );
 	}
 	return result;
+#endif
 }
 
 QString SlaOutputDev::UnicodeParsedString(const std::string& s1) const
