For types other than multipart (which is always 7bit) and text (which is
handled separately), use the transfer encoding given if it is different
than the default.
break;
default:
- $encoding = ($encode & self::ENCODE_8BIT || $encode & self::ENCODE_BINARY)
- ? '8bit'
- : 'base64';
+ /* If transfer encoding has changed from the default, use that
+ * value. */
+ if ($this->_transferEncoding != self::DEFAULT_ENCODING) {
+ $encoding = $this->_transferEncoding;
+ } else {
+ $encoding = ($encode & self::ENCODE_8BIT || $encode & self::ENCODE_BINARY)
+ ? '8bit'
+ : 'base64';
+ }
break;
}