Gnus development mailing list
 help / color / mirror / Atom feed
From: Shenghuo ZHU <zsh@cs.rochester.edu>
Cc: Lars Magne Ingebrigtsen <bugs@gnus.org>
Subject: Fix for broken QP-encoding bug
Date: 08 Sep 1999 18:17:26 -0400	[thread overview]
Message-ID: <5bhfl56oax.fsf@giga.cs.rochester.edu> (raw)
In-Reply-To: <xyf7lm7oi6u.fsf@win219.nas.nasa.gov>

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]


I hope this patch will fix broken QP-encoding bug.


In <xyf7lm7oi6u.fsf@win219.nas.nasa.gov> 
>>>>> "Thomas" == Thomas H Olsen <tolsen@nas.nasa.gov> 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 <hermit@clark.net> 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  <zsh@cs.rochester.edu>

	* 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 96-zsh3.diff --]
[-- Type: text/x-patch, Size: 1423 bytes --]

--- ../../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."

      parent reply	other threads:[~1999-09-08 22:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-03 20:26 MIME error with pgnus 0.96 Thomas H. Olsen
1999-09-05  3:13 ` Mark Buda
1999-09-07 13:03   ` Mark Buda
1999-09-08 22:17 ` Shenghuo ZHU [this message]

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

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

  git send-email \
    --in-reply-to=5bhfl56oax.fsf@giga.cs.rochester.edu \
    --to=zsh@cs.rochester.edu \
    --cc=bugs@gnus.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.
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 NNTP newsgroup(s).