public void setCharset(Charset charset) {
        this.charset = charset;
    }
Sets charset.

@param charset the charset
extension/src/main/java/com/alibaba/fastjson2/support/config/FastJsonConfig.java