From yamaoka jpl.org Wed Nov 25 09:12:07 2009 From: yamaoka jpl.org (Katsumi Yamaoka) Date: Wed, 25 Nov 2009 09:12:07 +0900 Subject: [BUG] mel-q's encoder doesn't work with Emacs 23 Message-ID: Hi, I realized mel-q.el's QP encoder doesn't work with Emacs23 if it runs in a multibyte buffer. Some people seem to use it rather than the one of mel-q-ccl.el for some reason. Cf. http://article.gmane.org/gmane.mail.wanderlust.general/2695 Related articles: http://article.gmane.org/gmane.emacs.mime.japanese/676 http://article.gmane.org/gmane.emacs.mime.japanese/677 (Japanese) The way to reproduce the bug is as follows: --8<---------------cut here---------------start------------->8--- (require 'mel) (mel-use-module 'mel-q '("quoted-printable" "Q")) (let ((buffer "*testing*")) (pop-to-buffer buffer) (erase-buffer) (set-buffer-multibyte t) (insert "Gr䏩 Gott\n") (sit-for 1) (encode-coding-region (point-min) (point-max) 'iso-8859-1) (sit-for 1) (funcall (mel-find-function 'mime-encode-region "quoted-printable") (point-min) (point-max))) --8<---------------cut here---------------end--------------->8--- Debugger entered--Lisp error: (args-out-of-range "0123456789ABCDEF" 262143) [...] 262143 is a representation of the iso-8859-1 encoded letter "" in the multibyte buffer of Emacs 23, though it is displayed as "\374". In Emacs 22 or older, it is just 252 (i.e., ?\374). The attached patch makes mel-q's encoder run in a unibyte buffer. -------------- next part -------------- $B%F%-%9%H7A<00J30$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B... $B%U%!%$%kL>(B: $BL5$7(B $B7?(B: text/x-patch $B%5%$%:(B: 680 $B%P%$%H(B $B bL@(B: $BL5$7(B URL: