Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Cc: Ding Mailing List <ding@gnus.org>
Subject: Re: Encoding of messages
Date: Mon, 27 Aug 2007 10:16:35 -0500	[thread overview]
Message-ID: <m2ir71xb1o.fsf@lifelogs.com> (raw)
In-Reply-To: <fahh6v$m98$03$1@news.t-online.com> ("Eric =?iso-8859-1?Q?B?= =?iso-8859-1?Q?=F6se-Wolf=22's?= message of "Wed, 22 Aug 2007 16:28:38 +0200")

The following message is a courtesy copy of an article
that has been posted to gnu.emacs.gnus as well.

On Wed, 22 Aug 2007 16:28:38 +0200 eric.boese-wolf@t-online.de (Eric Böse-Wolf) wrote: 

EB> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Gnus does not convert messages for storage AFAIK.  What are you trying
>> to accomplish?

EB> I use spam.el with spam-use-bogofilter (bogofilter configured with
EB> unicode=yes and default_charset=utf-8) and I noticed correctly
EB> displayed german umlauts and badly displayed german umlauts in my
EB> bogoutil -d wordlist.db output. So I assumed bogofilter received
EB> messages in different encodings and wanted to stop that to get
EB> a nice and plain bogoutil -d wordlist.db output.

(I maintain spam.el)

The function that gets the article as a string is

(defun spam-get-article-as-string (article)
  (when (numberp article)
    (with-temp-buffer
      (gnus-request-article-this-buffer
       article
       gnus-newsgroup-name)
      (buffer-string))))

and then that string gets passed to bogofilter:

	  (when (stringp article-string)
	    (with-temp-buffer
	      (insert article-string)
	         (apply 'call-process-region
		     (point-min) (point-max)
		     spam-bogofilter-program
		     nil nil nil switch
		     (if db `("-d" ,db "-v") `("-v")))))))

So spam.el just passes the article as a string, using the
gnus-request-article-this-buffer function.  We can change this if
necessary, to add extra parameters to bogofilter's invocation or to
spam-get-article-as-string to encode to UCS/UTF-8.  I don't know much
about Gnus article encodings so I'm cc-ing this to the ding mailing list
as well in case someone can help.

Ted

p.s. your English is fine :)



       reply	other threads:[~2007-08-27 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fagmo3$m8p$02$1@news.t-online.com>
     [not found] ` <m2ps1f4qj5.fsf@lifelogs.com>
     [not found]   ` <fahh6v$m98$03$1@news.t-online.com>
2007-08-27 15:16     ` Ted Zlatanov [this message]
     [not found]       ` <fauq9i$68n$01$2@news.t-online.com>
2007-08-27 16:46         ` Ted Zlatanov

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=m2ir71xb1o.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /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).