deal with non-ASCII characters