Fix character position reporting problem with UTF-8 characters.