You're right, a ratio for character_width(Char1) to character_width(Char2) is needed. Otherwise a utf8 Char2 might not be found in a utf32 Char1 string even if it is there.