Attention! PREG_OFFSET_CAPTURE not UTF-8 aware when using u modifier
and it's not a but, it's a feature:
https://bugs.php.net/bug.php?id=37391
Possible workaround: Use mb_strpos to get the correct offset, instead of the flag.
UTF-8 support would be nice.