From aca5f0072b531d9621b0ff90e656e589281c8155 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 9 Oct 2017 16:46:23 +0300 Subject: [PATCH] Avoid encoding errors in message.el * lisp/gnus/message.el (message-clone-locals): Don't clone message-default-charset. (Bug#25645) --- lisp/gnus/message.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 95eae6ba811..f874a0e3b8e 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -8060,8 +8060,13 @@ regexp VARSTR." (or (null varstr) (string-match varstr (symbol-name (car local))))) (ignore-errors - (set (make-local-variable (car local)) - (cdr local))))) + ;; Cloning message-default-charset could cause an already + ;; encoded text to be encoded again, yielding raw bytes + ;; instead of characters in the message. + (unless (string-match "message-default-charset" + (symbol-name (car local))) + (set (make-local-variable (car local)) + (cdr local)))))) locals))) ;;; -- 2.39.5