summaryrefslogtreecommitdiffstats
path: root/src/UtfString.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/UtfString.php')
-rw-r--r--src/UtfString.php5
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');
}