[FX.php List] (mail) - problems with Æ - Ø - Å

Baard Belsaas fxphp at belsaas.no
Tue May 1 16:29:11 MDT 2007


Hi Erik

I try this in my site, but the unhtmlentities-code give me a Fatal error:
Call to undefined function: unhtmlentities() in
/Library/WebServer/Documents/mailtest.php on line 3

The same happens on another server with the html_entity_decode, but not on
my local mac. Do I have to do some setup in the php to get this work?


/Baard


På 01-05-07 07:34, skrev "Erik Andreas Cayré" <erik at cayre.dk>:

> 
> Den 01/05/2007 kl. 6.15 skrev Baard Belsaas:
> 
>> Hello, I have a send mail in my fx.php-site. I use the php-code "
>> mail()".
>> When there is a æ/Æ, ø/Ø or å/Å in the data from FileMaker, the
>> text in the
>> mail come with "wrong text". The letters print like this:
>> æ = &#230;
>> Æ = &#198;
>> ø = &#248;
>> Ø = &#216;
>> å = &#229;
>> Å = &#197;
>> 
>> Someone out there nowes anything about this? Please...
>> 
>> 
>> Baard
> 
> Hi Baard,
> 
> The text from Filemaker is HTML-encoded by FX.php, ready to show on a
> webpage.
> 
> Use html_entity_decode() on the text going into you email. It uses
> ISO-8859-1 by default, which is fine for most purposes.
> 
> Example:
> $to = html_entity_decode($_SESSION['order']['customername'] . ' <' .
> $_SESSION['order']['customeremail'] . '>');
> $subject = 'Your order ' . $_SESSION['order']['id'];
> 
> // Convert HTMLencoding to ISO 8859-1
> $message = unhtmlentities($message);
> 
> 
> // headers
> 
> $mailheaders = 'From: websitename <noreply at domain>' . '
> ' .'Reply-To: Customer Service <service at domain>' . '
> ' .'Bcc: secretrecipient <007 at otherdom>' . '
> ' . 'MIME-Version: 1.0' . '
> ' . 'Content-type: text/plain; charset=ISO-8859-1' . '
> ' . 'Content-Transfer-Encoding: quoted-printable' . '
> ' . 'X-Mailer: MyMagicMailer';
> 
> // send mail receipt
> 
> mail($to, $subject, wordwrap($message, 70), $mailheaders);
> 
> Best regards
> 
> ---
> Erik Andreas Cayré
> Spangsbjerg Møllevej 169
> 6705 Esbjerg Ø
> 
> Privat Tel: 75150512
> Mobil: 40161183
> 
> ---
> »Interesse kan skabe læring på en skala sammenlignet med frygt, som
> en nuklear eksplosion i forhold til en kineser.«
> --Stanley Kubrick
> 
> »Kun p....sure mennesker kan ændre verden. Innovation skabes ikke af
> 'markedsanalyse', men af folk, der er afsindigt irriterede over
> tingenes tilstand «
> --Tom Peters
> 
> »Hvis du ikke kan forklare det simpelt, forstår  du det ikke godt nok.«
> -- Albert Einstein
> 
> »Hvis du ikke har tid til at gøre det rigtigt, hvornår vil du så have
> tid til at lave det om?«
> -- John Wooden, basketball coach
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 




More information about the FX.php_List mailing list