[FX.php List] The Euro sign (€ or €) in email messages

Erik Andreas Cayré erik at cayre.dk
Fri May 4 13:00:57 MDT 2007


Hi all,

After the discussion som days ago regarding (un)encoding text, I  
decided to finally try to solve a problem which has been waiting for  
my attention.

At the end of a completed purchase, the customer is presented with a  
web page receipt, and the script generating it also sends an email  
receipt to the customer.

Reading the docs for html_entity_decode() I decided to try the  
charset ISO-8859-15, since it supposedly contains the Euro sign € (in  
case any of you don't know, it's the currency symbol for the  
relatively new common currency now in use in most European countries)

Snippets of my code:
$message2 = html_entity_decode($message, ENT_COMPAT, 'ISO-8859-15');

$mailheaders2 = 'From: dagkort.dk <php at dagkort.dk>' . '
' .'Reply-To: dagkort.dk <service at dagkort.dk>' . '
' . 'MIME-Version: 1.0' . '
' . 'Content-type: text/plain; charset=ISO-8859-15' . '
' . 'Content-Transfer-Encoding: quoted-printable' . '
' . 'X-Mailer: PHP/' . phpversion();

// send testmail receipt

	mail('erik.cayre at dagkort.dk', $subject, wordwrap($message2, 70),  
$mailheaders2);

The messages sent using the above do not correctly show the Euro sign.
Instead I get this '¬' (don't know the name of that character, but  
it's &#xAC; when HTML encoded)

Does anyone have a solution, or a clue?


---
Erik Andreas Cayré
Spangsbjerg Møllevej 169
DK-6705 Esbjerg Ø

Home Tel: +45 75150512
Mobile: +45 40161183

»Interest can produce learning on a scale compared to fear as a  
nuclear explosion to a firecracker.«
--Stanley Kubrick

»If you can't explain it simply, you don't understand it well enough.«
-- Albert Einstein

»If you don't have time to do it right, when will you have time to do  
it over?«
-- John Wooden, basketball coach




More information about the FX.php_List mailing list