diff --git a/composer.json b/composer.json index fb7674e..72a7e28 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "require" : { "ext-ctype": "*", "ext-dom": "*", - "ext-libxml" : "*", "php" : ">=5.3.0" }, "require-dev": { diff --git a/src/HTML5/Parser/UTF8Utils.php b/src/HTML5/Parser/UTF8Utils.php index f6a70bf..4405e4c 100644 --- a/src/HTML5/Parser/UTF8Utils.php +++ b/src/HTML5/Parser/UTF8Utils.php @@ -38,7 +38,7 @@ class UTF8Utils /** * Count the number of characters in a string. - * UTF-8 aware. This will try (in order) iconv, MB, libxml, and finally a custom counter. + * UTF-8 aware. This will try (in order) iconv, MB, and finally a custom counter. * * @param string $string * @@ -55,12 +55,6 @@ public static function countChars($string) return iconv_strlen($string, 'utf-8'); } - if (function_exists('utf8_decode')) { - // MPB: Will this work? Won't certain decodes lead to two chars - // extrapolated out of 2-byte chars? - return strlen(utf8_decode($string)); - } - $count = count_chars($string); // 0x80 = 0x7F - 0 + 1 (one added to get inclusive range)