From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53751 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus: UTF-8 and compatibility with other MUAs Date: Sun, 17 Aug 2003 19:27:21 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1061142006 32389 80.91.224.253 (17 Aug 2003 17:40:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Aug 2003 17:40:06 +0000 (UTC) Original-X-From: ding-owner+M2292@lists.math.uh.edu Sun Aug 17 19:40:05 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19oRVd-0006fk-00 for ; Sun, 17 Aug 2003 19:40:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19oRUb-0008Kc-00; Sun, 17 Aug 2003 12:39:01 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19oRUX-0008KX-00 for ding@lists.math.uh.edu; Sun, 17 Aug 2003 12:38:57 -0500 Original-Received: (qmail 15384 invoked by alias); 17 Aug 2003 17:38:57 -0000 Original-Received: (qmail 15379 invoked from network); 17 Aug 2003 17:38:57 -0000 Original-Received: from main.gmane.org (80.91.224.249) by sclp3.sclp.com with SMTP; 17 Aug 2003 17:38:57 -0000 Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19oRVa-0004Fk-00 for ; Sun, 17 Aug 2003 19:40:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19oRKo-0004Bo-00 for ; Sun, 17 Aug 2003 19:28:54 +0200 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 19oRJj-0008D4-00 for ; Sun, 17 Aug 2003 19:27:47 +0200 Original-Lines: 57 Original-X-Complaints-To: usenet@sea.gmane.org X-Attribution: os X-Face: "HgH2sgK|bfH$;PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:uA/7jgnHI/lyyx33SUhXULj10uY= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53751 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53751 Ivan Boldyrev writes: > On 8472 day of my life Oliver Scholz wrote: >>> Perhaps some day we can try ASCII first, then fall back to UTF-8. But >>> that will take a long time. Even moving to ISO-8859-1 in northern >>> Europe took a long time, and still isn't finished. I still use IBMPC2 >>> (CP437?) in some regional communication channels. >> [...] >> >> I think it is in general a good idea to choose the encoding according >> to the audience. Fortunately this is not hard with Gnus. There are >> some people to which I send my mail in Latin-1. > > Do you use special group for them or do something more tricky? I started to use the BBDB recently and I added a special property for people that should receive mail in an encoding other than UTF-8, like: egoge-encoding: latin-1 Before that I kept their Email-addresses in a list, the mechanics are similar then. But I am not sure whether a defadvice around `message-send-and-exit' is the best way to do this. (defadvice message-send-and-exit (around egoge-latin-1-friendly activate) "Query the BBDB for a preferred encoding for this message." (let* ((address (message-fetch-field "to")) (encoding (and address (egoge-bbdb-get-prop (cadr (gnus-extract-address-components address)) 'egoge-encoding)))) (if (not encoding) ad-do-it (let ((mm-coding-system-priorities (cons (intern encoding) mm-coding-system-priorities))) ad-do-it)))) (defun egoge-bbdb-get-prop (address property) (let ((record (car (egoge-bbdb-find-address address)))) (and record (bbdb-record-getprop record property)))) (defun egoge-bbdb-find-address (address) "Return BBDB records which contain ADDRESS as net-address. Return nil if there is no such record." (bbdb-search (bbdb-records t) nil nil address)) Oliver -- 30 Thermidor an 211 de la Révolution Liberté, Egalité, Fraternité!