1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00

(rfc2047-encode): Use utf-8 charset as a last resort.

This commit is contained in:
Katsumi Yamaoka 2010-08-06 03:43:29 +00:00
parent c95b508f9b
commit cbfb942773
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-08-06 Katsumi Yamaoka <yamaoka@jpl.org>
* rfc2047.el (rfc2047-encode): Use utf-8 as a last resort if
determining charset of text fails.
2010-08-01 Katsumi Yamaoka <yamaoka@jpl.org>
* nnmail.el (nnmail-get-new-mail-1): Revert.

View File

@ -655,6 +655,9 @@ should not change this value.")
Point moves to the end of the region."
(let ((mime-charset (or (mm-find-mime-charset-region b e) (list 'us-ascii)))
cs encoding tail crest eword)
;; Use utf-8 as a last resort if determining charset of text fails.
(if (memq nil mime-charset)
(setq mime-charset (list 'utf-8)))
(cond ((> (length mime-charset) 1)
(error "Can't rfc2047-encode `%s'"
(buffer-substring-no-properties b e)))