On Wed, Mar 22, 2017 at 08:34:32AM -0700, $Bill wrote: > Date: Wed, 22 Mar 2017 08:34:32 -0700 > From: $Bill <dbec...@gmail.com> > To: Gérard ROBIN <g.rob...@free.fr> > Subject: Re: Bad display of accents in Subject > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 > Thunderbird/45.8.0 > > My response didn't show up in my usenet reader, so just in case: > > First reply: > > > use MIME::QuotedPrint; > my $subject = > q{=?iso-8859-1?Q?L'=E9t=E9_=E7a_sera_bient?= =?iso-8859-1?Q?=F4t?=}; > my $result = ''; > while ($subject =~ s/=\?iso-8859-1\?Q\?(.*?)\?=/$1/s) { > my $sub = $1; > $sub = MIME::QuotedPrint::decode_qp($sub); > $result .= $sub; > } > # $result should have what you started with > > > Second reply (simpler/better solution): > > use Encode::MIME::Header; > my $subject = > q{=?iso-8859-1?Q?L'=E9t=E9_=E7a_sera_bient?= =?iso-8859-1?Q?=F4t?=}; > my $result = decode ('MIME-Header', $subject);
Thank you to those who answered me. Bill The second solution works like a charm however I added: use Encode qw(is_utf8 encode decode); and qq{$subject} to interpolate $subject. I am stuck with the first solution ... Thank you again. -- Gerard _________________________________________ ***************************************** * Created with "mutt 1.7.2-1" * * under Debian Linux STRETCH 9.0 * * Registered Linux User #388243 * * https://Linuxcounter.net * ***************************************** -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/