From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25034 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Fix for broken QP-encoding bug Date: 08 Sep 1999 18:17:26 -0400 Organization: U of Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <5bhfl56oax.fsf@giga.cs.rochester.edu> References: <87vh9qrqyo.fsf@pazuzu.eudaemonia.org> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035162494 11957 80.91.224.250 (21 Oct 2002 01:08:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:08:14 +0000 (UTC) Cc: Lars Magne Ingebrigtsen Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id SAA26332 for ; Wed, 8 Sep 1999 18:19:30 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id RAB11933; Wed, 8 Sep 1999 17:19:25 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 08 Sep 1999 17:19:56 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id RAA23519 for ; Wed, 8 Sep 1999 17:19:45 -0500 (CDT) Original-Received: from cayuga.cs.rochester.edu (cayuga.cs.rochester.edu [192.5.53.209]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id SAA26163; Wed, 8 Sep 1999 18:17:29 -0400 (EDT) Original-Received: from slate.cs.rochester.edu (slate.cs.rochester.edu [192.5.53.101]) by cayuga.cs.rochester.edu (8.9.3/Q) with SMTP id SAA26544; Wed, 8 Sep 1999 18:17:28 -0400 (EDT) Original-Received: from giga.cs.rochester.edu (giga.cs.rochester.edu [192.5.53.186]) by slate.cs.rochester.edu (8.6.9/P) with ESMTP id SAA09617; Wed, 8 Sep 1999 18:17:27 -0400 Original-Received: (from zsh@localhost) by giga.cs.rochester.edu (SMI-8.6/P++) id SAA10691; Wed, 8 Sep 1999 18:17:27 -0400 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q Original-Lines: 38 User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:25034 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:25034 --=-=-= I hope this patch will fix broken QP-encoding bug. In >>>>> "Thomas" == Thomas H Olsen writes: Thomas> I tried to send a picture yesterday using pgnus Thomas> 0.96. When I try to read the message with pine or Thomas> Netscape I get an error message like "Formatting error: Thomas> Non-hexadecimal character in QP encoding." This bug was Thomas> not present in version 0.95. I am not sure whether Netscape accept QP encoded image. Please test it. In <87vh9qrqyo.fsf@pazuzu.eudaemonia.org> >>>>> "Mark" == Mark Buda writes: Mark> Both quoted-printable and base64 encodings appear to be Mark> broken in 0.96. Does base64 encodings appear to broken in 0.96? I can not reproduce such broken message. Shenghuo 1999-09-08 Shenghuo ZHU * mm-encode.el (mm-encode-content-transfer-encoding): Fold quoted-printable-encode-region. * qp.el (quoted-printable-encode-region): Assume charset encoded. Fold every line in the region. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=96-zsh3.diff --- ../../pgnus-sent/lisp/mm-encode.el Thu Sep 2 15:23:36 1999 +++ mm-encode.el Wed Sep 8 17:49:45 1999 @@ -63,7 +63,7 @@ (defun mm-encode-content-transfer-encoding (encoding &optional type) (cond ((eq encoding 'quoted-printable) - (quoted-printable-encode-region (point-min) (point-max))) + (quoted-printable-encode-region (point-min) (point-max) t)) ((eq encoding 'base64) (when (equal type "text/plain") (goto-char (point-min)) --- ../../pgnus-sent/lisp/qp.el Thu Sep 2 15:23:37 1999 +++ qp.el Wed Sep 8 17:07:36 1999 @@ -73,7 +73,7 @@ (save-excursion (save-restriction (narrow-to-region from to) - (mm-encode-body) +;; (mm-encode-body) ;; Encode all the non-ascii and control characters. (goto-char (point-min)) (while (and (skip-chars-forward @@ -95,13 +95,15 @@ (when fold ;; Fold long lines. (goto-char (point-min)) - (end-of-line) - (while (> (current-column) 72) - (beginning-of-line) - (forward-char 72) - (search-backward "=" (- (point) 2) t) - (insert "=\n") - (end-of-line)))))) + (while (not (eobp)) + (end-of-line) + (while (> (current-column) 72) + (beginning-of-line) + (forward-char 72) + (search-backward "=" (- (point) 2) t) + (insert "=\n") + (end-of-line)) + (forward-line)))))) (defun quoted-printable-encode-string (string) "QP-encode STRING and return the results." --=-=-=--