fix length for utf8 strings