in reply to Re: Transcoding MIME Strings
in thread Transcoding MIME Strings

I wanted :

Communique Telefonica Montreal Ministere

instead of :

Communiqué Telefónica Montreál Ministère
That is the problem I am trying to solve - I want the output to be in the "ASCII" character set.

Replies are listed 'Best First'.
Re^3: Transcoding MIME Strings
by almut (Canon) on Oct 10, 2009 at 00:29 UTC

    You could transliterate into ASCII in a second step, e.g. using Text::Unidecode:

    #!/usr/bin/perl use strict; use warnings; use MIME::Words qw(:all); use Text::Unidecode; my @encoded = ( '=?iso-8859-1?Q?Communiqu=E9?=', '=?iso-8859-1?Q?Telef=F3nica?=', '=?ISO-8859-1?Q?Montre=E1l?=', '=?iso-8859-1?Q?Minist=E8re?=', ); for (@encoded) { my $s = decode_mimewords($_); print unidecode($s), "\n"; } __END__ Communique Telefonica Montreal Ministere
      Dandy!