fix parsing PHP strings with multi-byte UTF-8 characters