Combine charset related checks into a single charset size check.