From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57251 Path: main.gmane.org!not-for-mail From: TSUCHIYA Masatoshi Newsgroups: gmane.emacs.gnus.semi.japanese,gmane.emacs.gnus.general Subject: Case of letters that specify encodings in MIME-encoded words Date: Mon, 10 May 2004 15:15:49 +0900 Sender: semi-gnus-ja-owner@meadowy.org Message-ID: <87fza84xka.fsf@pine.kuee.kyoto-u.ac.jp> Reply-To: semi-gnus-ja@meadowy.org NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1084169802 30758 80.91.224.253 (10 May 2004 06:16:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 May 2004 06:16:42 +0000 (UTC) Cc: semi-gnus-ja@meadowy.org Original-X-From: semi-gnus-ja-return-8723-gegsj-semi-gnus-ja-403=m.gmane.org@meadowy.org Mon May 10 08:16:33 2004 Return-path: Original-Received: from meadow.scphys.kyoto-u.ac.jp ([130.54.54.165]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1BN45Y-0003Dl-00 for ; Mon, 10 May 2004 08:16:32 +0200 Original-Received: (qmail 2241 invoked by uid 1001); 10 May 2004 06:16:22 -0000 Mailing-List: contact semi-gnus-ja-help@meadowy.org; run by ezmlm X-ML-NAME: semi-gnus-ja Precedence: bulk Original-Received: (qmail 32741 invoked from network); 10 May 2004 06:16:21 -0000 X-SendingHost: 130.54.208.130 Original-To: ding@gnus.org Mail-Followup-To: ding@gnus.org User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) X-Dispatcher: imput version 20031028(IM146) Original-Lines: 67 X-ML-COUNT: 8723 Xref: main.gmane.org gmane.emacs.gnus.semi.japanese:1557 gmane.emacs.gnus.general:57251 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57251 --=-=-= Hi, I noticed that several MUAs (including Microsoft Outlook Express) fail to decode MIME-encoded subjects which are composed with Gnus. In order to check the detail of this problem, I send three mails that have MIME-encoded subjects to my friend who uses Microsoft Outlook Express, and ask him to check whether these subjects are successfully decoded or not. The result is here: MIME-encoded subject field | Result --------------------------------------+------------- =?iso-2022-jp?b?GyRCNEE7ehsoQg==?= | undecoded =?iso-2022-jp?B?GyRCNEE7ehsoQg==?= | decoded =?ISO-2022-JP?B?GyRCNEE7ehsoQg==?= | decoded This result shows that this broken decoder decodes MIME-encoded words whose encodings are specified in the uppercase letter "B", and shows that it does not decode a word whose encoding is specified in the lowercase letter "b". I think that a careless programmer implemented this decoder reading the fourth section of RFC2047, 4. Encodings Initially, the legal values for "encoding" are "Q" and "B". and he/she failed to notice the second section. 2. Syntax of encoded-words encoded-word = "=?" charset "?" encoding "?" encoded-text "?=" charset = token ; see section 3 encoding = token ; see section 4 Both 'encoding' and 'charset' names are case-independent. Thus the charset name "ISO-8859-1" is equivalent to "iso-8859-1", and the encoding named "Q" may be spelled either "Q" or "q". It is true that my reporting problem is not caused by Gnus, but I think that the attached change may be useful for Gnus users who are forced to communicate with users of such broken MUAs, and that it is not harmful to Gnus at least. Can I commit this change? -- TSUCHIYA Masatoshi --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- rfc2047.el 7 Apr 2004 19:41:45 -0000 7.11 +++ rfc2047.el 7 May 2004 09:07:53 -0000 @@ -406,7 +406,7 @@ 'Q)))) (start (concat "=?" (downcase (symbol-name mime-charset)) "?" - (downcase (symbol-name encoding)) "?")) + (upcase (symbol-name encoding)) "?")) (factor (case mime-charset ((iso-8859-5 iso-8859-7 iso-8859-8 koi8-r) 1) ((big5 gb2312 euc-kr) 2) --=-=-=--