Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] workaround non ascii chars in rfc2231
@ 2005-11-22 13:43 Pixel
  2005-11-24  4:26 ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Pixel @ 2005-11-22 13:43 UTC (permalink / raw)


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

hi,

i've received a mail having: "Content-Disposition: attachment; filename=fêtesxxxxxx.pdf",
and so that part was considered text/plain.

with the following patch, it works. It's quite simple: since
forward-sexp stop at first 8-bit char, i simply retry.

a better (??) patch would be to modify the syntax table?

i attach a simple mail containing the pb

cu


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-workaround-non-ascii-chars-in-rfc2231.patch --]
[-- Type: text/x-patch, Size: 783 bytes --]

Index: lisp/rfc2231.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/rfc2231.el,v
retrieving revision 7.6
diff -u -r7.6 rfc2231.el
--- lisp/rfc2231.el	28 Jul 2005 02:05:21 -0000	7.6
+++ lisp/rfc2231.el	22 Nov 2005 11:41:09 -0000
@@ -127,7 +127,13 @@
 		       (> c ?\177)) ;; EXTENSION: Support non-ascii chars.
 		   (not (memq c stoken)))
 	      (setq value (buffer-substring
-			   (point) (progn (forward-sexp) (point)))))
+			   (point) 
+			   (progn (forward-sexp) 
+				  ;; EXTENSION: Support non-ascii chars.
+				  (while (and (not (eobp))
+					      (> (char-after) ?\177))
+				    (forward-char 1) (forward-sexp))
+				  (point)))))
 	     (t
 	      (error "Invalid header: %s" string)))
 	    (if number

[-- Attachment #3: zz --]
[-- Type: application/octet-stream, Size: 2688 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-11-24 23:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-22 13:43 [PATCH] workaround non ascii chars in rfc2231 Pixel
2005-11-24  4:26 ` Katsumi Yamaoka
2005-11-24 20:13   ` Reiner Steib
2005-11-24 21:08     ` Pascal (Pixel) Rigaux
2005-11-24 23:01       ` Katsumi Yamaoka

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