[rt-users] A solution for decoding iso-8859-1 subjects

Jesper Holm Olsen dunkel at diku.dk
Wed May 3 05:18:38 EDT 2000


I live in denmark and so once in a while use certain european characters
in the subjectlines. As RT does not decode this, I have been annoyed of
seeing something like:

      Subject: =?iso-8859-1?Q?Test_igen_=E5=E6=F8=C5=C6=D8_test?=

in the queue-view. I have now made a little hack, which someone perhaps
could find usefull too. Is is not pretty nor perfect, but it works for me
:-)

The trick is to use the MIME-module in perl to decode the quoted-printable
characters and then substitute the 'iso-8859-1'-tag away. This can, as I
said, probably be done quite more elegant, but hey, it works for me.

In lib/rt/ui/web/manipulate.pm, sub display_queue I changed
the place where 'subject' is printed to:

   <font size=-1>";
   #By Jesper Holm Olsen: This decodes Quoted-printable from subject.
   use MIME::QuotedPrint;
   my $decoded;
   $decoded = decode_qp($rt::req[$temp]{'subject'});
   $decoded =~ s/=\?iso-8859-1\?Q\?(.*)\?=/$1/;
   print "$decoded </font></TD>";

This way at least my overview of a queue is pretty to read.

--
Jesper Holm Olsen,  Department of Computer Science and Department of 
                    Film and Media studies, University of Copenhagen
Email: dunkel at diku.dk * Homepage: http://www.diku.dk/students/dunkel







More information about the rt-users mailing list