--- mm-decode.el~ 2018-02-28 02:01:37.897607000 +0000 +++ mm-decode.el 2018-03-13 02:23:04.321753900 +0000 @@ -1810,6 +1810,11 @@ (when (and (or coding (setq coding (mm-charset-to-coding-system charset nil t))) (not (eq coding 'ascii))) + ;; Remove extra bytes in utf-8 encoded data. + (when (eq coding 'utf-8) + (goto-char (point-min)) + (while (re-search-forward "[\x00-\x7f]+\\([\x80-\xbf]\\)" nil t) + (replace-match "\\1"))) (insert (prog1 (decode-coding-string (buffer-string) coding) (erase-buffer)