diff --git a/composer.json b/composer.json index 8e659b9..6ed9aa4 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,8 @@ "type": "library", "license": "MIT", "require": { - "php": ">=7.0.0" + "php": ">=7.0.0", + "ext-mbstring": "*" }, "autoload": { "psr-0": { diff --git a/src/FastXml/Parser.php b/src/FastXml/Parser.php index 0ceaa38..4dc3649 100644 --- a/src/FastXml/Parser.php +++ b/src/FastXml/Parser.php @@ -188,7 +188,7 @@ public function endTag($parser, $name) */ public function convertEntities($content) { - $table = array_map('utf8_encode', array_flip( + $table = array_map(function($str){/*return utf8_encode($str);*/return mb_convert_encoding($str,'UTF-8','ISO-8859-1');}, array_flip( array_diff( get_html_translation_table(HTML_ENTITIES), get_html_translation_table(HTML_SPECIALCHARS)