From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Evil Boris Newsgroups: gmane.emacs.devel Subject: automatic MIME decoding in rmail Date: Thu, 23 Mar 2006 11:32:56 -0500 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1143131656 1594 80.91.229.2 (23 Mar 2006 16:34:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Mar 2006 16:34:16 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 23 17:34:13 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FMSlI-00083W-PZ for ged-emacs-devel@m.gmane.org; Thu, 23 Mar 2006 17:34:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FMSlI-0004vc-Ap for ged-emacs-devel@m.gmane.org; Thu, 23 Mar 2006 11:34:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FMSl2-0004vV-1v for emacs-devel@gnu.org; Thu, 23 Mar 2006 11:33:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FMSl0-0004vJ-Su for emacs-devel@gnu.org; Thu, 23 Mar 2006 11:33:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FMSl0-0004vG-Oa for emacs-devel@gnu.org; Thu, 23 Mar 2006 11:33:54 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FMSld-0007lM-EE for emacs-devel@gnu.org; Thu, 23 Mar 2006 11:34:33 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FMSkU-0007Z2-7C for emacs-devel@gnu.org; Thu, 23 Mar 2006 17:33:23 +0100 Original-Received: from 207-38-193-43.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com ([207.38.193.43]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Mar 2006 17:33:22 +0100 Original-Received: from evilborisnet by 207-38-193-43.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Mar 2006 17:33:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 30 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207-38-193-43.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:fF1UYcIyoPjoQyZJUEaTtWVSqIQ= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52012 Archived-At: I have been caught several times by the following. Email comes with the content-type message header --------- Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original --------- Notice that CHARSET specifier does not immediately follow "text/plain"---there is a FORMAT specification intervening in between. For example hotmail.com sends such messages and several other services. (I have not been able to determine from reading the spec if this is allowed by the standard. Not sure how relevant that is though.) Emacs does not decode the charset correctly correct, because of the following: (defvar rmail-mime-charset-pattern "^content-type:[ ]*text/plain;[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?" "Regexp to match MIME-charset specification in a header of message. The first parenthesized expression should match the MIME-charset name.") I guess the fix is to replace [ \t\n]* with a pattern matching any number of intervening specifications. Not sure what form they should take, so will leave that for an expert. Thank, --Boris