protected function _encode($text)
    {
        $restore = mb_internal_encoding();
        mb_internal_encoding($this->_appCharset);
        if (empty($this->headerCharset)) {
            $this->headerCharset = $this->charset;
        }
        $return = mb_encode_mimeheader($text, $this->headerCharset, 'B');
        mb_internal_encoding($restore);

        return $return;
    }
protected function _encode($text)
    {
        $restore = mb_internal_encoding();
        mb_internal_encoding($this->_appCharset);
        if (empty($this->headerCharset)) {
            $this->headerCharset = $this->charset;
        }
        $return = mb_encode_mimeheader($text, $this->headerCharset, 'B');
        mb_internal_encoding($restore);

        return $return;
    }
protected function _encode ( $ text ) { $ restore = mb_internal_encoding ( ) ; mb_internal_encoding ( $ this -> _appCharset ) ; if ( empty ( $ this -> headerCharset ) ) { $ this -> headerCharset = $ this -> charset ; } $ return = mb_encode_mimeheader ( $ text , $ this -> headerCharset , 'B' ) ; mb_internal_encoding ( $ restore ) ; return $ return ; }
Encode the specified string using the current charset

@param string $text String to encode
@return string Encoded string
Encode the specified string using the current charset