Fix parsing of strings with multibyte characters.