=?iso-8859-1?Q?Communiqu=E9?=
=?iso-8859-1?Q?Telef=F3nica?=
=?ISO-8859-1?Q?Montre=E1l?=
=?iso-8859-1?Q?Minist=E8re?=
####
Communique
Telefonica
Montreal
Ministere
####
use MIME::Words qw(:all);
my $rawSub = $head->get( 'subject' );
my $mailSubject = decode_mimewords( $rawSub );
####
use MIME::WordDecoder;
my $wd = supported MIME::WordDecoder "US-ASCII";
### Decode a MIME string (e.g., into Latin1) via the default decoder:
my $str = $wd->decode( $rawSub );
print $str, "\n";
####
use MIME::WordDecoder;
my $wd = new MIME::WordDecoder::US_ASCII;
$wd->unknown( '_' ); # What to translate unknown characters to
$wd->collapse( 1 ); # Collapse runs of unknown characters to a single unknown
print $wd->decode( $rawSub ), "\n";
####
use Date::Manip;
Date_Init( "ConvTZ=IGNORE", "TZ=GMT" ); # We don't want time conversions happening. GMailBackup ignores timezone conformance and keeps timestamps as they were
# If using Date::Transform, you can use '%g' that is short for %a, %d %b %Y %H:%M:%S %z - Fri, 28 Apr 1995 17:23:15 EDT; For eg : Sat, 9 Feb 2008 17:04:08 -0330
$mailDate = UnixDate( $mailDate , '%Y_%m_%Q-%H%M%S' ); # 2008_02_20080209-170408