From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67920 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus should accept UTF8 even if UTF-8 is standard Date: Tue, 16 Dec 2008 08:35:54 +0900 Organization: Emacsen advocacy group Message-ID: References: <87iqruvs19.fsf@jidanni.org> <86od1mj3z2.fsf@lifelogs.com> <86od1lg3xq.fsf@lifelogs.com> <87d4i1iqpq.fsf@marauder.physik.uni-ulm.de> <86k5c9fzm9.fsf@lifelogs.com> <878wsph5xr.fsf@marauder.physik.uni-ulm.de> <86d4i1ft75.fsf@lifelogs.com> <873air44me.fsf@marauder.physik.uni-ulm.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229384214 30427 80.91.229.12 (15 Dec 2008 23:36:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Dec 2008 23:36:54 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M16366@lists.math.uh.edu Tue Dec 16 00:37: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 1LCN0d-0001kH-7c for ding-account@gmane.org; Tue, 16 Dec 2008 00:37: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 1LCMzN-0003CJ-Is; Mon, 15 Dec 2008 17:36:37 -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 1LCMzM-0003Bu-1x for ding@lists.math.uh.edu; Mon, 15 Dec 2008 17:36:36 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LCMzI-0007Pe-WB for ding@lists.math.uh.edu; Mon, 15 Dec 2008 17:36:35 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LCMzV-0006Pf-00 for ; Tue, 16 Dec 2008 00:36:45 +0100 Original-Received: from localhost ([127.0.0.1]:34162) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1LCMyi-00039i-Ts for ding@gnus.org; Mon, 15 Dec 2008 17:35:57 -0600 X-Hashcash: 1:20:081215:ding@gnus.org::mBaNIKcDMTwz74CT:00000/ps 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:biKz3q8d/j4zokw5DEGRvEr1oV4= 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:67920 Archived-At: >>>>> In (in gmane.emacs.gnus.cvs) >>>>> Reiner Steib wrote: > Date: Monday, December 15, 2008 @ 20:44:47 > Author: cvs > Path: /usr/local/cvsroot/gnus/lisp > Modified: ChangeLog mm-util.el > (mm-charset-synonym-alist): Add bogus names "UTF8" and "ISO_8859-1". This change potentially makes Gnus be a shameful newsreader that sends messages with bogus charsets. I must cope with it. >>>>> In Katsumi Yamaoka wrote: > Type `C-c C-m p text/plain RET' in the message buffer and add > charset=utf8 manually as follows: > < #part type="text/plain" disposition=inline charset=utf8> > In this case the message will be sent with charset=utf8 . >>>>> In <873air44me.fsf@marauder.physik.uni-ulm.de> >>>>> Reiner Steib wrote: >> I'm surprised that `mm-charset-synonym-alist' has any effect on >> outgoing messages. I though it would only be used when displaying an >> article. Could you please investigate this? >>>>> In Katsumi Yamaoka wrote: > That is due to `mml-generate-mime-1' that uses the charset specified > as is (for encoding, it uses the valid coding system derived from > that charset according to `mm-charset-synonym-alist', though). > It's a bug, I have two solutions, and I like the second one: > 1. Bind `mm-charset-synonym-alist' (and `mm-charset-eval-alist') > to nil when encoding. And signal an error if the charset is > invalid. > 2. Replace the charset that is an alias with the valid one that > Emacs knows. Although it violates the idea that "the charset > aliases would be used only when displaying an article", it > will be convenience for users. > WDYT? The patches for 1. and 2. are below: I've installed 2. The code and the comment have been slightly modified. > Patch1: > --- mml.el~ 2008-10-03 05:47:11 +0000 > +++ mml.el 2008-10-20 23:58:29 +0000 > @@ -476,8 +476,11 @@ > "application/octet-stream") > "text/plain"))) > (charset (cdr (assq 'charset cont))) > - (coding (mm-charset-to-coding-system charset)) > + (coding (let (mm-charset-eval-alist mm-charset-synonym-alist) > + (mm-charset-to-coding-system charset))) > encoding flowed coded) > + (unless coding > + (error "Unknown charset: %s" charset)) > (cond ((eq coding 'ascii) > (setq charset nil > coding nil)) > Patch2: > --- mml.el~ 2008-10-03 05:47:11 +0000 > +++ mml.el 2008-10-20 23:58:29 +0000 > @@ -482,7 +482,12 @@ > (setq charset nil > coding nil)) > (charset > - (setq charset (intern (downcase charset))))) > + ;; `charset' might be an alias that `mm-charset-synonym-alist' > + ;; provides and might not be in common use, so we prefer > + ;; the one that Emacs knows for `coding'. > + (setq charset (if coding > + (mm-coding-system-to-mime-charset coding) > + (intern (downcase charset)))))) > (if (and (not raw) > (member (car (split-string type "/")) '("text" "message"))) > (progn Regards,