Gnus development mailing list
 help / color / mirror / Atom feed
* Case of letters that specify encodings in MIME-encoded words
@ 2004-05-10  6:15 TSUCHIYA Masatoshi
  2004-05-10  7:34 ` Katsumi Yamaoka
  2004-05-12 17:39 ` TSUCHIYA Masatoshi
  0 siblings, 2 replies; 3+ messages in thread
From: TSUCHIYA Masatoshi @ 2004-05-10  6:15 UTC (permalink / raw)
  Cc: semi-gnus-ja

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

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 389 bytes --]

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

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

end of thread, other threads:[~2004-05-12 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-10  6:15 Case of letters that specify encodings in MIME-encoded words TSUCHIYA Masatoshi
2004-05-10  7:34 ` Katsumi Yamaoka
2004-05-12 17:39 ` TSUCHIYA Masatoshi

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