From: Robert Pluim <rpluim@gmail.com>
To: Christophe TROESTLER <Christophe.TROESTLER@umons.ac.be>
Cc: 35265@debbugs.gnu.org
Subject: bug#35265: 26.1; gnus-icalendar: charset detection
Date: Sun, 14 Apr 2019 14:41:25 +0200 [thread overview]
Message-ID: <m236mkdaiy.fsf@gmail.com> (raw)
In-Reply-To: <87d0lphqz5.fsf@poincare.umons.ac.be> (Christophe TROESTLER's message of "Sun, 14 Apr 2019 09:32:32 +0000")
[-- Attachment #1: Type: text/plain, Size: 664 bytes --]
>>>>> On Sun, 14 Apr 2019 09:32:32 +0000, Christophe TROESTLER <Christophe.TROESTLER@umons.ac.be> said:
Christophe> Ical invitations sent by Google use a content type
Christophe> such as
Christophe> Content-Type: text/calendar; charset="UTF-8";
Christophe> method=REQUEST
Christophe> The problem is that the charset is not properly
Christophe> understood by gnus-icalendar because it is
Christophe> capitalized. The following “downcase” in the
Christophe> definition of “gnus-icalendar-with-decoded-handle”
Christophe> fixes the problem:
Looks obviously correct. Eli, can I put this in emacs-26?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Downcase-charset.patch --]
[-- Type: text/x-patch, Size: 1111 bytes --]
From 009929e3bb10692bd5ac10e4f1613cc6065a21e7 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Sun, 14 Apr 2019 14:36:30 +0200
Subject: [PATCH] Downcase charset
To: emacs-devel@gnu.org
RFC 2046 specifies that the charset parameter is case-insensitive.
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-with-decoded-handle):
Downcase charset. Suggested by Christophe TROESTLER
<Christophe.TROESTLER@umons.ac.be>. (Bug#35265).
---
lisp/gnus/gnus-icalendar.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index f79ce36843..e4ad2af063 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -767,7 +767,7 @@ gnus-icalendar-with-decoded-handle
`(let ((,charset (cdr (assoc 'charset (mm-handle-type ,handle)))))
(with-temp-buffer
(mm-insert-part ,handle)
- (when (string= ,charset "utf-8")
+ (when (string= (downcase ,charset) "utf-8")
(decode-coding-region (point-min) (point-max) 'utf-8))
,@body))))
--
2.21.0.196.g041f5ea1cf
next prev parent reply other threads:[~2019-04-14 12:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-14 9:32 bug#35265: 26.1; gnus-icalendar: charset detection Christophe TROESTLER
2019-04-14 12:41 ` Robert Pluim [this message]
2019-04-14 14:21 ` Eli Zaretskii
2019-04-14 17:44 ` Robert Pluim
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=m236mkdaiy.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=35265@debbugs.gnu.org \
--cc=Christophe.TROESTLER@umons.ac.be \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.