Convert ISO-8859-1 (quoted-printable) to 8 bit

F

Fred

I use the following code to remove ISO-8859-1 from mail message-headers:

....
use MIME::QuotedPrint ;
$message =~ s/(Subject: |From: |Sender: |To: )
(\w*?)=\?ISO-8859-1\?[A-Z]\?(.+?)\?=/$1 $2$3/ig ;

if ($message =~ m/=[A-Za-z0-9]{2}/g ) {
$message =~ s/(=[A-Za-z0-9]{2})/decode_qp $1/ge ;
$message =~ s/Content-Transfer-Encoding:
quoted-printable/Content-Transfer-Encoding: binary/g ;
}
....

This works fine most of the time. However I am wondering if there is a
module which can do the job better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top