Hi,
Thanks for the tip.
We'll try to get this into the standard code for the next release.
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
my site is utf-8 encoded and formmal is using an HTML templates which is also utf-8 encoded. everything was great except the From Header was not utf-8 encoded and names written in utf-8 encoded arabic characters would come up as garbled text in Outlook.
to fix this, and have the name in From Header utf-8 encoded, change this, starting around line 7666:
to this:PHP Code:function MakeFromLine($s_email,$s_name)
{
$s_line = "";
if (!empty($s_email))
$s_line .= $s_email." ";
if (!empty($s_name))
$s_line .= "(".$s_name.")";
return ($s_line);
}
PHP Code:function MakeFromLine($s_email,$s_name)
{
$s_line = "";
if (!empty($s_email))
$s_line .= $s_email." ";
if (!empty($s_name))
$s_line .= "(=?utf-8?B?".base64_encode($s_name)."?=)";
return ($s_line);
}
this is based on formmail.php version 8.02 hope it helps someone.
and thanks again Russell for the truly awesome script.
Hi,
Thanks for the tip.
We'll try to get this into the standard code for the next release.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
Hi,
Update on this....
I want to implement a generic solution for all headers.
It needs also to be tied to the Language Packs, so UTF-8 alone is probably not good enough.
It's on the TO DO list.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
hi,
if you need any help testing, please let me know.
Hi,
We've now created a complete solution for international characters in email headers.
The problem is it's another 1000 lines of PHP code!
Because of the size, we're not that keen to add all that code into FormMail.
Instead, we'll add code to handle specific fields (From, Subject) and that will get into the next release of FormMail.
Last edited by russellr; 02-Jun-2009 at 01:28 AM. Reason: typo
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
Hi,
Version 8.16 of FormMail now provides support for international encoding in From and Subject lines.
It happens automatically when CharSet has been specified in either "mail_options" or in a language pack.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
Thanks for letting us know. I will try it out the following weeks.
There's still a small bug left
If there is a space in the field the text is garbled.
For example in the fromline:
"Åke" becomes "Åke"
but
"Åke A" becomes "=?UTF-8?Q?=C3=85ke A?="
The subject line suffers from the same issue.
Last edited by darmin; 10-Aug-2009 at 08:05 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks