diff --git a/src/PhpSpreadsheet/Shared/StringHelper.php b/src/PhpSpreadsheet/Shared/StringHelper.php index c4945540..2273333d 100644 --- a/src/PhpSpreadsheet/Shared/StringHelper.php +++ b/src/PhpSpreadsheet/Shared/StringHelper.php @@ -468,7 +468,10 @@ class StringHelper public static function convertEncoding($value, $to, $from) { if (self::getIsIconvEnabled()) { - return iconv($from, $to . '//IGNORE//TRANSLIT', $value); + $result = iconv($from, $to . '//IGNORE//TRANSLIT', $value); + if (false !== $result) { + return $result; + } } return mb_convert_encoding($value, $to, $from);