From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#35265: 26.1; gnus-icalendar: charset detection Date: Sun, 14 Apr 2019 14:41:25 +0200 Message-ID: References: <87d0lphqz5.fsf@poincare.umons.ac.be> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="119957"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35265@debbugs.gnu.org To: Christophe TROESTLER Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 14 14:42:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFeSa-000V4P-Es for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Apr 2019 14:42:12 +0200 Original-Received: from localhost ([127.0.0.1]:35337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFeSZ-0004p5-BT for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Apr 2019 08:42:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFeST-0004ok-2h for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2019 08:42:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hFeSR-00064W-7r for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2019 08:42:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hFeSQ-00063J-0t for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2019 08:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hFeSP-0000Z0-T2 for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2019 08:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Apr 2019 12:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35265 X-GNU-PR-Package: emacs Original-Received: via spool by 35265-submit@debbugs.gnu.org id=B35265.15552456982134 (code B ref 35265); Sun, 14 Apr 2019 12:42:01 +0000 Original-Received: (at 35265) by debbugs.gnu.org; 14 Apr 2019 12:41:38 +0000 Original-Received: from localhost ([127.0.0.1]:60132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hFeS2-0000YL-4T for submit@debbugs.gnu.org; Sun, 14 Apr 2019 08:41:38 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:40660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hFeRy-0000Y3-0y for 35265@debbugs.gnu.org; Sun, 14 Apr 2019 08:41:34 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id z24so16725992wmi.5 for <35265@debbugs.gnu.org>; Sun, 14 Apr 2019 05:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version; bh=aq5R5ymfnuQVIZoFuEVXce6483l/o/tgVsRrYtwczQA=; b=SyHkk7RZXOZ/LzMxBL3yYUQY/IM+PleG3JHxkxuXH++jol/0BKl4JZMt/7lJjRQH4Y 5WLqv+RXbI6rnexmxkA8Jj3ZRLilc9y0gQxnB123EaCkR8PqxmCO5X0rCuTSQils26Pg mJLkfhUC3hPRU08E6dhN3axRqz8/VbRhIhmRDCvG4HT9bO+WTMY7l1Gf4bDHJK9gy4a9 ucQBG88hjWRRCaQ90GIo24qaLlcEp0SO3imfDVj1u9hJMedfXm2m1dWFYV13z7kobqnX 6Ld2Joawp9YF95uZK/qeQDjKsgcWTQdQ6oXkl+1+VM4sfWshoIq8UCnhJ9wKIfweayWS 9vYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=aq5R5ymfnuQVIZoFuEVXce6483l/o/tgVsRrYtwczQA=; b=UGWcKH6lj6PUuOzFUlC2nvlWEiJh995iKb5TZWJ6MhWZjq+xhnYpBNz5CH+IHsyaLF ttikgCnPODk3GR1nAWnQ2Syw+GpXkhoRQnijh/r5pRV8CjCzeLGRVq6U3TbLSzHwv7u3 Y+fwdkU1jICCN4GXYfUVQUM5seZVLzIaoICKRilg7VN+6RgYcRN8Zqy4yrFmt+Ia1VwX 7WvSLS1l197mkpZDOFS6EqNxl+GwtkoRSuviWWVppBHa3QqVsxMKvGhNjcru6nLEQAkR aS2/peIQjG6kA1wkk6ERnUAwX6d+4kgopDraGkzV+Ws/tweMbmaTv/DKIOCk6c9kfhCD GFww== X-Gm-Message-State: APjAAAUb3yu2+nsHs+c9PcoT+jOseEs49vw4phjkChPBeY3fQaMxy3ft PlV0+wnyfN/CVZOXuwLugbgNmiS8 X-Google-Smtp-Source: APXvYqwsl5PRD6vbzWBbeyRczPuhVcZ9OHtIlBJ/2MCMJsq8ZjS8nXVMWTabdvYZQFnM9kKRa7Kpaw== X-Received: by 2002:a1c:6309:: with SMTP id x9mr18190391wmb.101.1555245687760; Sun, 14 Apr 2019 05:41:27 -0700 (PDT) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:8d50:d54a:3ca:4894]) by smtp.gmail.com with ESMTPSA id p6sm38373794wrs.6.2019.04.14.05.41.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 14 Apr 2019 05:41:26 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <87d0lphqz5.fsf@poincare.umons.ac.be> (Christophe TROESTLER's message of "Sun, 14 Apr 2019 09:32:32 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:157620 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> On Sun, 14 Apr 2019 09:32:32 +0000, Christophe TROESTLER said: Christophe> Ical invitations sent by Google use a content type Christophe> such as Christophe> Content-Type: text/calendar; charset=3D"UTF-8"; Christophe> method=3DREQUEST Christophe> The problem is that the charset is not properly Christophe> understood by gnus-icalendar because it is Christophe> capitalized. The following =E2=80=9Cdowncase=E2=80=9D in t= he Christophe> definition of =E2=80=9Cgnus-icalendar-with-decoded-handle= =E2=80=9D Christophe> fixes the problem: Looks obviously correct. Eli, can I put this in emacs-26? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Downcase-charset.patch >From 009929e3bb10692bd5ac10e4f1613cc6065a21e7 Mon Sep 17 00:00:00 2001 From: Robert Pluim 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 . (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 --=-=-=--