emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: rfc2047.el needs sanitizing


From: Katsumi Yamaoka
Subject: Re: rfc2047.el needs sanitizing
Date: Fri, 22 Oct 2004 17:06:20 +0900
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

>>>>> In <address@hidden> Dave Love wrote:

> The quoted-printable functions in mail-utils.el should then be fixed
> to use rfc2047.el functions.  Currently `mail-quote-printable' is
> wrong:  QP-encoding needs to use the appropriate MIME charset (not
> just assume 8859-1) and obey the RFC 2047 rules.  Then the
> mail-unquote-... functions only look for a (case sensitive) 8859-1
> encoding, which isn't good enough, and presumably they should insert
> the appropriate multibyte characters.

Excuse me to divert the subject, but please keep in mind that
there's also a bug in rfc2047.el of the Gnus v5.11 version.  As
for non-ascii text to be encoded by the iso-2022-* charset,
`rfc2047-encode' in Gnus v5.11 cannot be used for QP-encoding.
It is not serious since the encoder uses B-encoding for those
charsets by default, though.  Here's an example:

(let ((rfc2047-charset-encoding-alist
       (cons '(iso-2022-jp . Q) rfc2047-charset-encoding-alist)))
  (rfc2047-decode-string
   (rfc2047-encode-string "寿限無寿限無五劫のすり切れ")))
"=?iso-2022-jp?q?=1B$B=3Cw8BL5=3Cw8BL58^9e$N$9$j=1B=28B?==?is...

In addition, the encoder of the version encodes a text into too
short fragments frequently and makes a message header large.

(rfc2047-encode-string "寿限無寿限無五劫のすり切れ")
"=?iso-2022-jp?b?GyRCPHc4Qkw1PHc4QhsoQg==?=
 =?iso-2022-jp?b?GyRCTDU4XjllJE4kORsoQg==?=
 =?iso-2022-jp?b?GyRCJGobKEI=?= =?iso-2022-jp?b?GyRCQFokbBsoQg==?="

Even though it looks ugly to me, it is not against the rule
either.  In No Gnus, I've improved them as far as I could.





reply via email to

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