Gnus development mailing list
 help / color / mirror / Atom feed
From: Oliver Scholz <alkibiades@gmx.de>
Subject: Re: Gnus: UTF-8 and compatibility with other MUAs
Date: Sun, 17 Aug 2003 19:27:21 +0200	[thread overview]
Message-ID: <uoeyogpom.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: <vu3111xsef.ln2@elaleph.borges.cgitftp.uiggm.nsc.ru>

Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> 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é!




  reply	other threads:[~2003-08-17 17:27 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-14 15:48 Xavier Maillard
2003-08-14 22:39 ` Frank Schmitt
2003-08-15 18:22   ` Xavier Maillard
2003-08-14 23:01 ` Jesper Harder
2003-08-15 13:50   ` Oliver Scholz
2003-08-15 16:48     ` Jesper Harder
2003-08-15 18:10       ` Oliver Scholz
2003-08-16  0:23         ` Jesper Harder
2003-08-16  9:48           ` Oliver Scholz
2003-08-16 13:01             ` Jesper Harder
2003-08-16 15:36               ` Oliver Scholz
2003-08-16 17:14                 ` Reiner Steib
2003-08-16 19:29                   ` Oliver Scholz
2003-08-19 14:54                   ` Miles Bader
2003-08-20 15:24                     ` Reiner Steib
2003-08-21  0:20                       ` Miles Bader
2003-08-16 17:23                 ` Simon Josefsson
2003-08-16 19:18                   ` Oliver Scholz
2003-08-16 22:24                     ` Simon Josefsson
2003-08-17 12:30                       ` Benjamin Riefenstahl
2003-08-17 16:40                         ` Oliver Scholz
2003-08-18  2:20                           ` James H. Cloos Jr.
2003-08-18 15:58                           ` Benjamin Riefenstahl
2003-08-18  2:16                       ` James H. Cloos Jr.
2003-08-18  2:09                   ` James H. Cloos Jr.
2003-08-28 13:38                     ` Jens Müller
2003-08-28 13:35                   ` Jens Müller
2003-08-17  0:57                 ` Jesper Harder
2003-08-17 17:24                   ` Oliver Scholz
2003-08-17 18:21                     ` Matthias Andree
2003-08-15 18:24   ` Xavier Maillard
2003-08-16  0:35     ` Jesper Harder
2003-08-14 23:05 ` Simon Josefsson
2003-08-15 17:00   ` Oliver Scholz
2003-08-16  7:43     ` Ivan Boldyrev
2003-08-17 17:27       ` Oliver Scholz [this message]
2003-08-18  6:01     ` Steinar Bang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uoeyogpom.fsf@ID-87814.user.dfncis.de \
    --to=alkibiades@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).