public function setCharsetOverride($charsetOverride, $onlyIfNoCharset = false)
    {
        if (!$onlyIfNoCharset || $this->getCharset() === null) {
            $this->charsetOverride = $charsetOverride;
        }
    }
public function setCharsetOverride($charsetOverride, $onlyIfNoCharset = false)
    {
        if (!$onlyIfNoCharset || $this->getCharset() === null) {
            $this->charsetOverride = $charsetOverride;
        }
    }
public function setCharsetOverride ( $ charsetOverride , $ onlyIfNoCharset = false ) { if ( ! $ onlyIfNoCharset || $ this -> getCharset ( ) === null ) { $ this -> charsetOverride = $ charsetOverride ; } }
Overrides the default character set used for reading content from content
streams in cases where a user knows the source charset is not what is
specified.

If set, the returned value from MessagePart::getCharset is ignored.

Note that setting an override on a Message and calling getTextStream,
getTextContent, getHtmlStream or getHtmlContent will not be applied to
those sub-parts, unless the text/html part is the Message itself.
Instead, Message:getTextPart() should be called, and setCharsetOverride
called on the returned MessagePart.

@param string $charsetOverride
@param boolean $onlyIfNoCharset if true, $charsetOverride is used only if
getCharset returns null.
Overrides the default character set used for reading content from content streams in cases where a user knows the source charset is not what is specified .