info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recoding messages to latin1+html when posting to yahoo groups?


From: Katsumi Yamaoka
Subject: Re: recoding messages to latin1+html when posting to yahoo groups?
Date: Wed, 30 Jan 2008 11:15:34 +0900
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

>>>>> James Leifer wrote:

> I'm running Ubuntu gutsy with

>   Gnus v5.13

>   GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.0) of
>   2007-12-30 on iridium

> and happily editing French emails and documents in utf-8 which gnus
> handles beautifully for posting and reading.

> My problem is that when I distribute messages via the Yahoo groups
> mailing lists, all utf-8 accented characters get garbled.  I did several
> experiments with mm-content-transfer-encoding-defaults to see if base64,
> 8bit, or quoted-printable would be handled correctly by yahoo, with no
> success.  Yahoo only handles iso-8859-1.

[...]

> Is there any way to set a gnus hook that recodes a utf-8 email into
> latin1 plus html entities when sending to any address of the form
> .*@yahoogroupes.fr?  I know that the unix program recode can do this
> kind of thing, but I don't understand:

An easy way is to customize the `mm-coding-system-priorities'
variable so that Latin-1 may be most preferred when encoding
messages.  To do that:

(setq mm-coding-system-priorities '(iso-8859-1))

It affects all messages to send, but isn't it enough for you?
If you want it to affect only messages to send to yahoogroupes.fr,
there will be several ways.  Here is one of them:

(defadvice mml-to-mime (around prefer-latin1-in-yahoo-mails activate)
  "Prefer Latin1 when encoding messages sent to @yahoogroupes.fr."
  (let* ((recipients (message-options-get 'message-recipients))
         (mm-coding-system-priorities
          (if (and recipients
                   (string-match "@yahoogroupes\\.fr\\(?:,\\|\\'\\)"
                                 recipients))
              (cons 'iso-8859-1 mm-coding-system-priorities)
            mm-coding-system-priorities)))
    ad-do-it))

To try it, evaluate this form or put it in your ~/.gnus.el file.
People might know the smart way better than this.  Anyone? ;-)

At any rate, please note that Gnus will use the charset that is
not Latin-1 if the message contains text which cannot be encoded
by it.

Regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]