@item encoding
Valid values are @samp{7bit}, @samp{8bit}, @samp{quoted-printable} and
-@samp{base64} (@code{Content-Transfer-Encoding}). @xref{Charset
-Translation}.
+@samp{base64}. @xref{Charset
+Translation}. This parameter says what
+@code{Content-Transfer-Encoding} to use when sending the part, and is
+normally computed automatically.
+
+@item data-encoding
+This parameter says what encoding has been used on the data, and the
+data will be decoded before use. Valid values are
+@samp{quoted-printable} and @samp{base64}. This is useful when you
+have a part with binary data (for instance an image) inserted directly
+into the Message buffer inside the @samp{"<#part>...<#/part>"} tags.
@item description
A description of the part (@code{Content-Description}).
:max-width (truncate (* (frame-pixel-width) 0.8))
:max-height (truncate (* (frame-pixel-height) 0.8))
:scale 1)
- (format "<#part type=\"image/png\" disposition=inline content-transfer-encoding=base64 raw=t>\n%s\n<#/part>"
+ (format "<#part type=\"image/png\" disposition=inline data-encoding=base64 raw=t>\n%s\n<#/part>"
;; Get a base64 version of the image -- this avoids later
;; complications if we're auto-saving the buffer and
;; restoring from a file.
;; We have a part that already has a transfer encoding. Undo
;; that so that we don't double-encode later.
(when (and raw
- (cdr (assq 'content-transfer-encoding tag)))
+ (cdr (assq 'data-encoding tag)))
(with-temp-buffer
(set-buffer-multibyte nil)
(insert contents)
(mm-decode-content-transfer-encoding
- (intern (cdr (assq 'content-transfer-encoding tag)))
+ (intern (cdr (assq 'data-encoding tag)))
(cdr (assq 'type tag)))
(setq contents (buffer-string))))
(when (and (not raw) (memq nil charsets))