Set HTTP Content-Type
@param string $type
@param string $charset
@return void
763911
public static function contentType($type, $charset = 'utf-8'){
        $type = isset( self::$types[$type] ) ? self::$types[$type] : $type;
        self::set('Content-Type: '. $type. '; charset='. $charset);
    }
700525
public function addContent(string $content, string $contentType, ?string $charset = null): Message
    {
        $charset = $charset ?: $this->getCharset();

        $this->content[] = [
            'content'      => $content,
            'content_type' => $contentType,
            'charset'      => $charset
        ];

        return $this;
    }
1133950
public function setContentType(string $content_type)
    {
        if (empty($content_type)) {
            Throw new HeaderException('Empty content type is not allowed.');
        }

        $this->content_type = $content_type;
    }
204659
function setContentType($mime_type, $charset='utf-8') {
		
		$header = 'Content-Type: ' . $mime_type;
		if ($charset) {
			$header .= '; charset='.$charset;
		}
		
		$this->headers[] = array($header, TRUE);
		
		return $this;
	}
713290
public function setCharset($charset, $method = null)
    {
        if ($method === null) {
            $method = $this->getConfig('method');
        }

        $this->query($method . ' ' . $charset);

        return $this->getConnect()->set_charset($charset);
    }
472919
public function charset($charset = null)
    {
        if (!func_num_args()) {
            return $this->_stream->charset();
        }
        $this->_stream->charset($charset);
        return $this;
    }
915512
public function setContentType($contentType)
    {
        if (is_bool(strpos($contentType, 'charset=')) && $this->charset) {
            $contentType .= '; charset=' . $this->charset;
        }
        
        $this->headers['Content-Type'] = $contentType;
        return $this;
    }
878217
public function setContentType($contentType = null)
    {
        if ($contentType === null) {
            $contentType = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null;
        }

        $this->contentType = $contentType;
    }
900713
public function addJavaScript( $uri, $type = NULL, $charset = NULL )
	{
		$typeDefault	= 'text/javascript';
		if( isset( $this->metaTags["http-equiv:content-script-type"] ) )
			$typeDefault	= $this->metaTags["http-equiv:content-script-type"]['content'];
		$scriptData	= array(
			'type'		=> $type ? $type : $typeDefault,
			'charset'	=> $charset ? $charset : NULL,
			'src'		=> $uri,
		);
		$this->scripts[]	= $scriptData;
	}
294108
public Part<T> setContentType(MediaType contentType) {
        headers.add(HttpHeaders.CONTENT_TYPE, contentType.toString());
        return this;
    }
1121568
public function setContentType($contentType, $charset = null)
    {
        if ($charset === null) {
            $this->setHeader('Content-Type', $contentType);
        } else {
            $this->setHeader('Content-Type', $contentType . '; charset=' . $charset);
        }

        return $this;
    }
239637
public function setContent($data, $type = DataFormats::PHP_ARRAY)
    {
        $this->content = $data;

        switch ($type) {
            case DataFormats::PHP_ARRAY:
                $this->contentAsArray = $data;
                $this->contentType = ''; // this could be null, but may cause issues with clients
                break;
            case DataFormats::JSON:
                $this->contentAsArray = json_decode($data, true);
                $this->contentType = DataFormats::toMimeType($type);
                break;
        }

        return $this;
    }
1176648
public function setCharset($charset)
    {
        $this->clearCachedValueIf($charset != $this->charset);
        $this->charset = $charset;
        if (isset($this->encoder)) {
            $this->encoder->charsetChanged($charset);
        }
    }
738631
public function setCharset($charset)
    {
        if (is_string($charset)) {
            if (in_array($charset, mb_list_encodings())) {
                $this->charset = $charset;
            } else {
                throw new \InvalidArgumentException(
                    "Invalid value '" . $charset . "' for argument 'charset' given. Charset not supported."
                );
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($charset). "' for argument 'charset' given."
            );
        }

        return $this;
    }
393502
public function charsetChanged($charset)
    {
        $this->charset = $charset;
        $this->encoder->charsetChanged($charset);
        $this->paramEncoder->charsetChanged($charset);
    }
732079
public static function setCharSet($charset) {
        self::init();
        if(!self::$_db) {
            self::connect();
        }
        self::$_env->setCharset($charset);
    }
825810
public function setCharset($charset)
    {
        parent::setCharset($charset);
        if (isset($this->paramEncoder)) {
            $this->paramEncoder->charsetChanged($charset);
        }
    }