From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67861 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: [bugfixed] mm-charset-override-alist isn't used in decoding headers Date: Wed, 10 Dec 2008 19:03:17 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228903494 21057 80.91.229.12 (10 Dec 2008 10:04:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Dec 2008 10:04:54 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M16307@lists.math.uh.edu Wed Dec 10 11:05:58 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LALx4-0005TB-B4 for ding-account@gmane.org; Wed, 10 Dec 2008 11:05:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1LALvC-00034Z-S7; Wed, 10 Dec 2008 04:03:58 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LALvB-00034P-NW for ding@lists.math.uh.edu; Wed, 10 Dec 2008 04:03:57 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LALv9-0004bA-59 for ding@lists.math.uh.edu; Wed, 10 Dec 2008 04:03:57 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LALvK-0007QV-00 for ; Wed, 10 Dec 2008 11:04:07 +0100 Original-Received: from localhost ([127.0.0.1]:40549) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1LALub-0002nV-0E for ding@gnus.org; Wed, 10 Dec 2008 04:03:21 -0600 X-Hashcash: 1:20:081210:ding@gnus.org::oPzUdJ7t8AM+GSp5:00005Z1v X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:sBAXtQDw7YqHGgs39nw0HhdJTLU= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67861 Archived-At: Hi, I receive Japanese mails that are labeled with charset=gb2312, however most of them use charset=gbk in reality. So, Gnus normally fails in decoding those messages. Adding the `(gb2312 . gbk)' pair to `mm-charset-override-alist' solves it in decoding bodies, however it is not effective in decoding headers. Here is an example: (rfc2047-decode-string "=?gb2312?b?srubcg==?=") I've fixed the rfc2047 decoder so as to use `mm-charset-override-alist'. In addition, I've added the `(gb2312 . gbk)' pair to the custom choices (not the default value) of `mm-charset-override-alist'. Although the `gbk' charset is a superset of the `gb2312' charset, the reason I didn't add the pair to the default value of `mm-charset-override-alist' is that the `gbk' is not available in Emacs 21 normally and there seemed to be no smart way to exclude it in such Emacs versions. (Note that that I mention here is the `gbk' charset, not the `gbk' coding system. So, `mm-charset-to-coding-system' is the best choice for checking whether it is available or not. However, when loading mm-util,elc the default value section and/or the `:set' section of `(defcustom mm-charset-override-alist ...)' are processed before defining that function.) Regards,