Mercurial > emacs
changeset 109649:1f8f03cfcd2b
(rfc2047-encode): Use utf-8 charset as a last resort.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Fri, 06 Aug 2010 03:43:29 +0000 |
parents | 2eaef8962aef |
children | 98a5d29bd346 b60dcdd855f0 |
files | lisp/gnus/ChangeLog lisp/gnus/rfc2047.el |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Fri Aug 06 03:40:47 2010 +0000 +++ b/lisp/gnus/ChangeLog Fri Aug 06 03:43:29 2010 +0000 @@ -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.
--- a/lisp/gnus/rfc2047.el Fri Aug 06 03:40:47 2010 +0000 +++ b/lisp/gnus/rfc2047.el Fri Aug 06 03:43:29 2010 +0000 @@ -655,6 +655,9 @@ 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)))