replace Charset string to Charset instance.