system: check the index of the utf2latin string to avoid crash