Gnus development mailing list
 help / color / mirror / Atom feed
* Re: Encoding of messages
       [not found]   ` <fahh6v$m98$03$1@news.t-online.com>
@ 2007-08-27 15:16     ` Ted Zlatanov
       [not found]       ` <fauq9i$68n$01$2@news.t-online.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Ted Zlatanov @ 2007-08-27 15:16 UTC (permalink / raw)
  Cc: Ding Mailing List

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 :)



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Encoding of messages
       [not found]       ` <fauq9i$68n$01$2@news.t-online.com>
@ 2007-08-27 16:46         ` Ted Zlatanov
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Zlatanov @ 2007-08-27 16:46 UTC (permalink / raw)
  Cc: Ding Mailing List

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

On Mon, 27 Aug 2007 17:23:30 +0200 eric.boese-wolf@t-online.de (Eric Böse-Wolf) wrote: 

EB> How does spam.el handle encrypted messages? Hopefully it
EB> does not feed them into bogofilter :-)

As I said, it uses gnus-request-article-this-buffer, so whatever that
function returns goes into bogofilter or any other spam.el backend.  I'm
sure I can modify spam-get-article-as-string to do extra processing if
needed, I just don't know that piece of Gnus well enough.  I am cc-ing
the ding mailing list for comments.

Ted



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-27 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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     ` Encoding of messages Ted Zlatanov
     [not found]       ` <fauq9i$68n$01$2@news.t-online.com>
2007-08-27 16:46         ` Ted Zlatanov

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).