emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106654: Fix incorrect display of RFC


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106654: Fix incorrect display of RFC2047 encoded names in Rmail summary buffers
Date: Sat, 10 Dec 2011 15:46:25 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106654
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2011-12-10 15:46:25 +0200
message:
  Fix incorrect display of RFC2047 encoded names in Rmail summary buffers
  
   lisp/mail/rmailsum.el (rmail-header-summary): RFC2047 decode the
   `from' or `to' address before taking its substring.  Fixes
   incorrect display in Rmail summary buffer whereby an RFC2047
   encoded name is chopped in the middle of the encoded string, and
   thus displayed encoded.
modified:
  lisp/ChangeLog
  lisp/mail/rmailsum.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-12-10 12:49:33 +0000
+++ b/lisp/ChangeLog    2011-12-10 13:46:25 +0000
@@ -1,3 +1,11 @@
+2011-12-10  Eli Zaretskii  <address@hidden>
+
+       * mail/rmailsum.el (rmail-header-summary): RFC2047 decode the
+       `from' or `to' address before taking its substring.  Fixes
+       incorrect display in Rmail summary buffer whereby an RFC2047
+       encoded name is chopped in the middle of the encoded string, and
+       thus displayed encoded.
+
 2011-12-10  Juanma Barranquero  <address@hidden>
 
        * makefile.w32-in (update-subdirs-CMD): Use a Local Variables section.

=== modified file 'lisp/mail/rmailsum.el'
--- a/lisp/mail/rmailsum.el     2011-11-20 02:23:48 +0000
+++ b/lisp/mail/rmailsum.el     2011-12-10 13:46:25 +0000
@@ -762,6 +762,12 @@
                                              (point)))))))))
               (if (null from)
                   "                         "
+                ;; We are going to return only 25 characters of the
+                ;; address, so make sure it is RFC2047 decoded before
+                ;; taking its substring.  This is important when the address 
is not on the same line as the name, e.g.:
+                ;; To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= 
=?UTF-8?Q?N=C4=9Bmec?=
+                ;; <address@hidden>
+                (setq from (rfc2047-decode-string from))
                 (setq len (length from))
                 (setq mch (string-match "address@hidden" from))
                 (format "%25s"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]