bug-gnats
[Top][All Lists]
Advanced

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

Re: Gnats & MIME


From: Palle Girgensohn
Subject: Re: Gnats & MIME
Date: Thu, 08 Mar 2001 20:56:23 +0100

He Yngve!

Thanks for your reply.

I have made one "enhancement", as an alternative to fixing
gnats or not decode the Subject: my script removes all "dots"
etc from the ISO-8859-1 special characters in the mail Subject
header. This stops replies to the mail to end up as a new PR,
which happens otherwise since gnats cannot cope with eight bit
chars. åäö -> aao, which is better than =E5=F6=E6 or similar...
:)

Works lika a charm for me.

BTW, I tried resolving the problem in file-pr.c, but ended up
in regex.c, gnats' own regex wrapper (?). I ran out of time and
made this hack instead.

Cheers,
Palle


Yngve Svendsen wrote:
> 
> At 17:01 19.02.2001 +0100, Palle Girgensohn wrote:
> >Hi!
> >
> >Has anyone tried to get gnats to behave more politely with
> >MIMEified mails. Now, it will not work at all if the subject is
> >mimified (by for example, correctly embedding Swedish åäö
> >characters with ?ISO?8859... stuff). Also, messages can look
> >pretty ugly, with lots of '=E5' for every ä etc...
> >
> >I'm running 3.113. Will this behave better in version 4? Has
> >anyone patched gnats?
> >
> >/Palle
> 
> Use a script to translate quoted printables. The following little Perl
> script does this (yes, it might be tad unelegant, but it works):
> 
> #########################
> #!/usr/bin/perl
> 
> use MIME::QuotedPrint ();
> while (<>) {
>    $line = $_;
>    $line =~ s/=\?iso-8859-1\?Q\?//i;
>    $line =~ s/\?=//g;
> 
>    if ($line =~ /^Subject/ ) {
>        $line =~ tr/_/ /;
>    };
> 
>    if ($line =~ /^From/ ) {
>        $line =~ tr/_/ /;
>    };
> 
>    $line = MIME::QuotedPrint::decode($line);
> 
>    print $line;
> };
> 
> ########################
> 
> Then set up the mail alias which receives bug reports to pipe messages
> through this script before it is piped into queue-pr. Like this:
> 
> | /path-to-script/script.pl | /usr/local/libexec/gnats/queue-pr -q
> 
> Warning: this seems to break recognition of PR numbers when people reply by
> mail to PRs. I believe this to be because the regexp in file-pr that
> handles mail subject recognition breaks down when it encounters anything
> beyond 7-bit ASCII. The consequence is that if a PR that has such
> characters in the Subject is replied to by mail, file-pr will create a new
> problem report with a new number. A workaround is to remove the qp
> translation of the Subject line in the script above.
> 
> I haven't had time to look at the Subject recognition problem, so if
> someone else would care to take a peek at file-pr.c and see if they can
> find a solution, I'd be thankful.
> 
> Yngve Svendsen
> IS Engineer
> Clustra AS, Trondheim, Norway
> yngve.svendsen@clustra.com
> 
> _______________________________________________
> Bug-gnats mailing list
> Bug-gnats@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-gnats

-- 
         Partitur Informationsteknik AB    
Wenner-Gren Center             +46 8 566 280 02  
113 46 Stockholm               +46 70 785 86 02  
Sweden                         girgen@partitur.se

Attachment: gnats.pl
Description: Binary data


reply via email to

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