Bugfix: use strlen instead of mb_strlen to compute the offset (in byte)