unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* strange behavior in regexp matching
@ 2008-03-17 12:13 Katsumi Yamaoka
  2008-03-17 12:18 ` Christoph Conrad
  2008-03-17 12:20 ` Andreas Schwab
  0 siblings, 2 replies; 9+ messages in thread
From: Katsumi Yamaoka @ 2008-03-17 12:13 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

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,




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-03-17 22:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-17 12:13 strange behavior in regexp matching Katsumi Yamaoka
2008-03-17 12:18 ` Christoph Conrad
2008-03-17 12:20 ` Andreas Schwab
2008-03-17 13:42   ` Reiner Steib
2008-03-17 14:02     ` Andreas Schwab
2008-03-17 14:26       ` Reiner Steib
2008-03-17 14:52         ` Andreas Schwab
2008-03-17 19:42           ` Reiner Steib
2008-03-17 22:45             ` Kätsumi Yämäokä

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).