emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107555: mail-utils.el: multibyte cha


From: Richard Stallman
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107555: mail-utils.el: multibyte chars should be quoted.
Date: Sat, 10 Mar 2012 04:02:06 -0500
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107555
committer: Richard Stallman <address@hidden>
branch nick: trunk
timestamp: Sat 2012-03-10 04:02:06 -0500
message:
  mail-utils.el: multibyte chars should be quoted.
modified:
  lisp/ChangeLog
  lisp/mail/mail-utils.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-03-10 08:54:24 +0000
+++ b/lisp/ChangeLog    2012-03-10 09:02:06 +0000
@@ -1,5 +1,7 @@
 2012-03-10  Richard Stallman  <address@hidden>
 
+       * mail/mail-utils.el (mail-quote-printable): Quote multibyte chars.
+
        * mail/rmail.el (rmail-buffers-swapped-p): Don't assume dead
        view buffer means not swapped.
        (rmail-view-buffer-kill-buffer-hook): Give buf name in error msg.

=== modified file 'lisp/mail/mail-utils.el'
--- a/lisp/mail/mail-utils.el   2012-01-19 07:21:25 +0000
+++ b/lisp/mail/mail-utils.el   2012-03-10 09:02:06 +0000
@@ -63,12 +63,16 @@
 
 ;;;###autoload
 (defun mail-quote-printable (string &optional wrapper)
-  "Convert a string to the \"quoted printable\" Q encoding.
+  "Convert a string to the \"quoted printable\" Q encoding if necessary.
+If the string contains only ASCII characters and no troublesome ones,
+we return it unconverted.
+
 If the optional argument WRAPPER is non-nil,
 we add the wrapper characters =?ISO-8859-1?Q?....?=."
   (let ((i 0) (result ""))
     (save-match-data
-      (while (string-match "[?=\"\200-\377]" string i)
+      (while (or (string-match "[?=\"]" string i)
+                (string-match "[^\000-\177]" string i))
        (setq result
              (concat result (substring string i (match-beginning 0))
                      (upcase (format "=%02x"


reply via email to

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