]> git.eshelyaron.com Git - emacs.git/commitdiff
Match mail headers case-insensitively when encoding
authorRobert Pluim <rpluim@gmail.com>
Thu, 17 Apr 2025 14:08:53 +0000 (16:08 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 21 Apr 2025 20:33:54 +0000 (22:33 +0200)
* lisp/mail/rfc2047.el (rfc2047-encode-message-header): Bind
'case-fold-search' to t when looking up the encoding method,
otherwise a header spelled "CC" is encoded using the wrong
method.  (Bug#77866)

(cherry picked from commit 7d886f214e165d84d3fdbe14b3766d9e88056529)

lisp/mail/rfc2047.el

index 78a49924b3910f59e0a1f2200046605ebd9354e8..5fc53f1db974ef300462b1eb597a3204e27a2f74 100644 (file)
@@ -265,7 +265,8 @@ Should be called narrowed to the head of the message."
                 (if (= (length charsets) 1)
                     (cons (mm-charset-to-coding-system (car charsets))
                           mm-coding-system-priorities)
-                  mm-coding-system-priorities)))
+                  mm-coding-system-priorities))
+                (case-fold-search t))
            (while (setq elem (pop alist))
              (when (or (and (stringp (car elem))
                             (looking-at (car elem)))