code: @Override
      public void setCharacterEncoding(String charset) {
          if (null != this.outWriter || isCommitted()) {
              return;
          }
          if (null != charset) {
              this.encoding = connection.getEncodingUtils().stripQuotes(charset);
          }
          if (null != this.contentType) {
              int index = this.contentType.indexOf("charset=");
              StringBuilder sb = new StringBuilder();
              if (-1 != index) {
                  sb.append(this.contentType.substring(0, index - 1).trim());
              } else {
                  sb.append(this.contentType);
              }
              if (this.encoding != null) {
                  sb.append(";charset=").append(this.encoding);
              }
  
              this.contentType = sb.toString();
              this.response.setHeader("Content-Type", this.contentType);
          }
      }
docs: /*
  @see javax.servlet.ServletResponse#setCharacterEncoding(java.lang.String)