From 5d661d79d1429e9364885450e2e6509f667583a8 Mon Sep 17 00:00:00 2001 From: Henry Poyntz Date: Sat, 16 Mar 2019 14:02:38 +1100 Subject: [PATCH] Fixed "iconv(): Detected an incomplete multibyte character in input string [...] on line 923" --- rtf-html-php.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtf-html-php.php b/rtf-html-php.php index 5f9b693..59a7d32 100644 --- a/rtf-html-php.php +++ b/rtf-html-php.php @@ -920,7 +920,7 @@ protected function DecodeUnicode($code, $srcEnc = 'UTF-8') $utf8 = ''; if ($srcEnc != 'UTF-8') { // convert character to Unicode - $utf8 = iconv($srcEnc, 'UTF-8', chr($code)); + $utf8 = iconv(mb_detect_encoding($code, mb_detect_order(), false), "UTF-8", $code); } if ($this->encoding == 'HTML-ENTITIES') {