in reply to reading Base64 encoded Unicode email returns mangled text
The documentation warns against using decode_mimewords in scalar context. In fact, it suggests against using decode_mimewords in favour of unmime in MIME::WordDecoder.
If you were to use decode_mimewords, seems to me the proper usage would be:
my $subj = ''; foreach (decode_mimewords($mail->get('Subject'))) { my ($data, $charset) = @$_; if (defined($charset)) { $subj .= decode($charset, $data); } else { $subj .= $data; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: reading Base64 encoded Unicode email returns mangled text
by Errto (Vicar) on Mar 19, 2007 at 15:51 UTC | |
by ikegami (Patriarch) on Mar 19, 2007 at 17:13 UTC |