Subject: bug#59: 23.0.60; error: Multibyte character in QP encoding region

From: Reiner Steib <[email-masked]>
Date: Mon, 17 Mar 2008 14:35:46 +0100

Hi,

a recent change (after 2008-03-14) in the Emacs trunk breaks sending
mail with message mode.

To reproduce:

Start "emacs -Q".  In *scratch* eval...

(progn
  (setq debug-on-error t)
  (message-mail "foo" (concat "B"
                              (string (make-char 'latin-iso8859-1 228));; ä
                              "r")))

,----[ *mail to foo* ]
| To: foo
| Subject: Bär
| From: [your name]
| --text follows this line--
| [...]
`----

In the buffer *mail to foo* press `C-u M-x mml-preview RET'

Expected behavior (this is what I get with the version from 2008-03-14
09:20 CET):

,----[ *Raw preview of mail to foo* ]
| To: foo
| Subject: =?utf-8?Q?B=C3=A4r?=
| [...]
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
`----

Current behavior (see version info below):

,----[ *Backtrace* ]
| Debugger entered--Lisp error: (error "Multibyte character in QP encoding region")
|   signal(error ("Multibyte character in QP encoding region"))
|   error("Multibyte character in QP encoding region")
|   quoted-printable-encode-region(1 4 nil "-«^H»\n\f !#-'*+0-9A-Z\\^`-~«^?»)
|   rfc2047-q-encode-string("B«\303»«\244»")
|   rfc2047-encode-1(9 "B\x00e4r" utf-8 rfc2047-q-encode-string "=?utf-8?Q?" " " "")
|   rfc2047-encode(18 21)
|   rfc2047-encode-region(18 22)
|   mail-encode-encoded-word-buffer()
|   mml-to-mime()
|   mml-preview((4))
|   call-interactively(mml-preview t nil)
|   execute-extended-command((4))
|   call-interactively(execute-extended-command nil nil)
`----

(with: «^H» = #x8, «^?» = #x7f, «\303» = #o303, «\244» = #o244)

--8<---------------cut here---------------start------------->8---
In GNU Emacs 23.0.60.6 (i686-pc-linux-gnu, GTK+ Version 2.10.6)
 of 2008-03-16 on viandante
Windowing system distributor `The X.Org Foundation', version 11.0.70199902
configured using `configure '--prefix=/import/xtra/emacs/HEAD'
 '--exec-prefix=/import/xtra/emacs/HEAD-i686' 'CFLAGS=-Wno-pointer-sign
 -O0 -fno-crossjumping -gdwarf-2 -g3''

*OR*

In GNU Emacs 23.0.60.8 (i686-pc-linux-gnu, GTK+ Version 2.10.6)
 of 2008-03-17 on viandante
Windowing system distributor `The X.Org Foundation', version 11.0.70199902
configured using `configure '--prefix=/import/xtra/emacs/HEAD'
 '--exec-prefix=/import/xtra/emacs/HEAD-i686' 'CFLAGS=-Wno-pointer-sign
 -O0 -fno-crossjumping -gdwarf-2 -g3''

with...

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/