Determining bad characters