41 parent::__construct($headers, $encoder, $cache, $grammar);
43 if (!is_null($charset)) {
58 public function setBody($body, $contentType = null, $charset = null)
60 if (isset($charset)) {
65 parent::setBody($body, $contentType);
90 if ($charset !== $this->_userCharset) {
93 $this->_userCharset = $charset;
94 parent::charsetChanged($charset);
119 $this->_userFormat = $format;
146 $this->_userDelSp = $delsp;
177 parent::_fixHeaders();
192 $this->_nestingLevel = $level;
199 if (!in_array($charset, array(
'utf-8',
'iso-8859-1',
''))) {
201 if (function_exists(
'mb_convert_encoding')) {
202 $string = mb_convert_encoding($string, $charset,
'utf-8');
203 }
elseif (function_exists(
'iconv')) {
204 $string = iconv(
'utf-8//TRANSLIT//IGNORE', $charset, $string);
206 throw new Swift_SwiftException(
'No suitable convert encoding function (use UTF-8 as your charset or install the mbstring or iconv extension).');