minor cleanup to set the the charset directly