diff --git a/rector.php b/rector.php index 0a1ebd3..c2fe993 100644 --- a/rector.php +++ b/rector.php @@ -12,6 +12,6 @@ ]); $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_81 + LevelSetList::UP_TO_PHP_82 ]); }; diff --git a/src/PHPePub/Helpers/StringHelper.php b/src/PHPePub/Helpers/StringHelper.php index cb2faa3..00661ac 100644 --- a/src/PHPePub/Helpers/StringHelper.php +++ b/src/PHPePub/Helpers/StringHelper.php @@ -33,7 +33,7 @@ public static function fixEncoding($in_str) if (mb_detect_encoding($in_str) == "UTF-8" && mb_check_encoding($in_str, "UTF-8")) { return $in_str; } else { - return utf8_encode($in_str); + return mb_convert_encoding($in_str, 'UTF-8', 'ISO-8859-1'); } }