unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: emacs-devel@gnu.org
Cc: ding@gnus.org
Subject: strange behavior in regexp matching
Date: Mon, 17 Mar 2008 21:13:08 +0900	[thread overview]
Message-ID: <b4mk5k1lfaj.fsf@jpl.org> (raw)

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	other threads:[~2008-03-17 12:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 12:13 Katsumi Yamaoka [this message]
2008-03-17 12:18 ` strange behavior in regexp matching 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ä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mk5k1lfaj.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).