From: Pixel <pixel@mandriva.com>
Subject: [PATCH] workaround non ascii chars in rfc2231
Date: Tue, 22 Nov 2005 14:43:20 +0100 [thread overview]
Message-ID: <lymzjw6bnr.fsf@leia.mandriva.com> (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 --]
next reply other threads:[~2005-11-22 13:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-22 13:43 Pixel [this message]
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
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=lymzjw6bnr.fsf@leia.mandriva.com \
--to=pixel@mandriva.com \
/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).