specify UTF-8 encoding for mb_strlen

should fix the structured text span issue!