From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/10233 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.user Subject: Re: recoding messages to latin1+html when posting to yahoo groups? Date: Wed, 30 Jan 2008 11:15:34 +0900 Organization: Emacsen advocacy group Message-ID: References: <87sl0gekwl.fsf@varenne.domain.invalid> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201660863 16352 80.91.229.12 (30 Jan 2008 02:41:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jan 2008 02:41:03 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed Jan 30 03:41:24 2008 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JK2t7-0008Em-PN for gegu-info-gnus-english@m.gmane.org; Wed, 30 Jan 2008 03:41:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JK2sg-0000kr-OD for gegu-info-gnus-english@m.gmane.org; Tue, 29 Jan 2008 21:40:54 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news1.uni-leipzig.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 54 Original-X-Trace: individual.net NlQKN1evP+x8+75eaG9EBgt96qf9XHS045ElJ2qQi6cmPrxJA= Cancel-Lock: sha1:vDmQzXRvRxShGI0Fdov1KM82HoM= sha1:YwW7g9nzpF753GHU+Pmi2FeeWA4= 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.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Original-Xref: shelby.stanford.edu gnu.emacs.gnus:80445 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:10233 Archived-At: >>>>> 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,