Gnus development mailing list
 help / color / mirror / Atom feed
* rfc2047.el fix, please examine
@ 1999-12-13  8:49 Per Abrahamsen
  0 siblings, 0 replies; only message in thread
From: Per Abrahamsen @ 1999-12-13  8:49 UTC (permalink / raw)


Hi,

I tried forward a message with this subject:

Subject: [<Anonymous@dina.kvl.dk>] ¾ßÓа²Éñ£¬½¡Î¸¡¢ÒæÆ¢ºÍµ÷½ÚѪÆøµÈ¹¦ÄܵÄÈ«ÐÂÒûÁÏ--»ªÁ¢·þÎñ

(a spam complaint, charset unknown), but it got stuck in
`rfc2047-fold-region', trying to reuse the same whitespace for folding
again and again.  The fix below ensures that it only use the same
whitespace once.

However, I'm not sure it is the right fix, so I'd like someone who is
more familiar with MULE and MIME to say good for it before
committing.  Please.

PS: The final encoded subject looks like this:

Subject: [<Anonymous@dina.kvl.dk>]
  =?iso-8859-1?q?=BE=DF=D3=D0=B0=B2=C9=F1=A3=AC=BD=A1=CE=B8=A1=A2=D2=E6=C6=A2=BA?=
 
 =?iso-8859-1?q?=CD=B5=F7=BD=DA=D1=AA=C6=F8=B5=C8=B9=A6=C4=DC=B5=C4=C8=AB=D0=C2?=
 =?iso-8859-1?q?=D2=FB=C1=CF--=BB=AA=C1=A2=B7=FE=CE=F1?=

1999-12-13  Per Abrahamsen  <abraham@dina.kvl.dk>

	* rfc2047.el (rfc2047-fold-region): Don't use the same break twice.

Index: rfc2047.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/rfc2047.el,v
retrieving revision 5.31
diff -c -r5.31 rfc2047.el
*** rfc2047.el	1999/12/12 09:28:38	5.31
--- rfc2047.el	1999/12/13 08:39:34
***************
*** 234,242 ****
  	 ((and (not break)
  	       (looking-at "=\\?"))
  	  (setq break (point)))
! 	 ((and (looking-at "\\?=")
  	       (> (- (point) (save-excursion (beginning-of-line) (point))) 76))
  	  (goto-char break)
  	  (insert "\n ")
  	  (forward-line 1)))
  	(unless (eobp)
--- 234,244 ----
  	 ((and (not break)
  	       (looking-at "=\\?"))
  	  (setq break (point)))
! 	 ((and break
! 	       (looking-at "\\?=")
  	       (> (- (point) (save-excursion (beginning-of-line) (point))) 76))
  	  (goto-char break)
+ 	  (setq break nil)
  	  (insert "\n ")
  	  (forward-line 1)))
  	(unless (eobp)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-12-13  8:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-13  8:49 rfc2047.el fix, please examine Per Abrahamsen

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