public function setCharset($charset)
    {
        $this->setHeaderParameter('Content-Type', 'charset', $charset);
        if ($charset !== $this->userCharset) {
            $this->clearCache();
        }
        $this->userCharset = $charset;
        parent::charsetChanged($charset);

        return $this;
    }