diff options
Diffstat (limited to 'src/UtfString.php')
-rw-r--r-- | src/UtfString.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/UtfString.php b/src/UtfString.php index 8b53a6d..66ec4e4 100644 --- a/src/UtfString.php +++ b/src/UtfString.php @@ -76,10 +76,7 @@ class UtfString implements \ArrayAccess $this->str = $str; $this->byteIdx = 0; $this->charIdx = 0; - // TODO: `strlen($str)` might return a wrong length when function - // overloading is enabled. - // https://php.net/manual/ro/mbstring.overload.php - $this->byteLen = strlen($str); + $this->byteLen = mb_strlen($str, '8bit'); $this->charLen = mb_strlen($str, 'UTF-8'); } |