emacs-devel
[Top][All Lists]
Advanced

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

strange behavior in regexp matching


From: Katsumi Yamaoka
Subject: strange behavior in regexp matching
Date: Mon, 17 Mar 2008 21:13:08 +0900
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Hi,

Maybe due to the recent Emacs trunk change, I couldn't send a reply
to "Ville Skyttä" using Gnus.  When encoding that name in the message
header I got:

  (error "Multibyte character in QP encoding region")

This was issued by the `quoted-printable-encode-region' function
defined in qp.el:

(defun quoted-printable-encode-region (from to &optional fold class)
[...]
    (if (re-search-forward (mm-string-to-multibyte "[^\x0-\x7f\x80-\xff]")
                           to t)
        (error "Multibyte character in QP encoding region"))

An equivalent code that causes an error is:

(with-temp-buffer
  (set-buffer-multibyte nil)
  (insert (encode-coding-string "Ville Skyttä" 'iso-8859-1))
  (goto-char (point-min))
  (re-search-forward (string-to-multibyte "[^\x0-\x7f\x80-\xff]")
                     nil t))

While Emacs 22.1.92 returns nil for it, Emacs trunk returns a non-nil
value.  Is it an intended behavior?  If so, do you have an idea to
fix the problem?

Note: a buffer in which `quoted-printable-encode-region' is called
is multibyte or unibyte as the case may be.

Regards,




reply via email to

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