summaryrefslogtreecommitdiff
path: root/src/HTML5/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTML5/Parser')
-rw-r--r--src/HTML5/Parser/UTF8Utils.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/HTML5/Parser/UTF8Utils.php b/src/HTML5/Parser/UTF8Utils.php
index 9afb5ea..684d84a 100644
--- a/src/HTML5/Parser/UTF8Utils.php
+++ b/src/HTML5/Parser/UTF8Utils.php
@@ -50,6 +50,8 @@ class UTF8Utils
// Get the length for the string we need.
if (function_exists('mb_strlen')) {
return mb_strlen($string, 'utf-8');
+ } elseif (function_exists('iconv_strlen')) {
+ return iconv_strlen($string, 'utf-8');
} elseif (function_exists('utf8_decode')) {
// MPB: Will this work? Won't certain decodes lead to two chars
// extrapolated out of 2-byte chars?