On Sun, Jul 19, 2020 at 09:58:56AM +0200, Matthias Apitz wrote:
> El día Sonntag, Juli 19, 2020 a las 08:18:01 +0200, Ulrich Lauther escribió:
> > 
> > How can I get the subject lines in clear text?
> 
> $ cat subject.pl
> #!/usr/local/bin/perl
> #
> 
> use Encode;
> 
> my $subject = "Subject: =?utf-8?Q?Achtung=20=2D=20don=27t=20say=20that?=";
> 
> my $escapedHeaderLine = Encode::decode('MIME-Q', $subject);
> print $escapedHeaderLine, "\n";
> 
> 

Wow! Thanks a lot.

I changed it so that I can use it in a pipe:

:
eval 'exec perl -w -S $0 ${1+"$@"}'
  if  0;

use Encode;
while ($line = <>) {
  chomp $line;
  printf("%s\n",Encode::decode('MIME-Q', $line));
}

        ulrich

Reply via email to