public function setCharset($charset)
    {
        if (!in_array($charset, self::$SUPPORTED_CHARSETS)) {
            throw new \InvalidArgumentException('Unsupported encoding. (Supported encodings: '.implode(', ', self::$SUPPORTED_CHARSETS).')');
        }
        $this->charset = $charset;
    }
public function setCharset($charset)
    {
        if (!in_array($charset, self::$SUPPORTED_CHARSETS)) {
            throw new \InvalidArgumentException('Unsupported encoding. (Supported encodings: '.implode(', ', self::$SUPPORTED_CHARSETS).')');
        }
        $this->charset = $charset;
    }
public function setCharset ( $ charset ) { if ( ! in_array ( $ charset , self :: $ SUPPORTED_CHARSETS ) ) { throw new \ InvalidArgumentException ( 'Unsupported encoding. (Supported encodings: ' . implode ( ', ' , self :: $ SUPPORTED_CHARSETS ) . ')' ) ; } $ this -> charset = $ charset ; }
By default all input will be assumed to be UTF-8.

However, both iCalendar and vCard might be encoded using different
character sets. The character set is usually set in the mime-type.

If this is the case, use setEncoding to specify that a different
encoding will be used. If this is set, the parser will automatically
convert all incoming data to UTF-8.

@param string $charset
By default all input will be assumed to be UTF - 8 .