PDA

View Full Version : Just wrong charset in email subject



Totila
15-May-2009, 07:34 PM
Hello all,

I apologize if this message falls in the wrong forum for this is my first message.

The difference with the "Wrong charset in email subject" thread is that I ran into charset troubles with the From, Subject fields as well as with the message body. First of all, my configuration is:

Client : French Windows XP SP3 with Internet Explorer 8,
Server : Linux n3.mutu.sivit.org 2.6.26.5-node-grsec #1 SMP Fri Oct 3 07:01:30 CEST 2008 i686 with PHP Version 5.2.6-5

Indeed, I can provide more details if needed.

Following the advice of the FormMail author himself, whom I thank, I inserted the <input type="hidden" name="mail_options" value="CharSet=utf-8" /> instruction into the form description within the php page. The outcome was poor with the french letters that do not exist in english language ; but it was already better than without the utf-8 instruction. Anyway, I ran various settings using various client mail readers and here you are with the results:

| Eudora | Thunderbird
__________________________________________________________________________________________________________________________________________________
Page setting | From and subject fields | Message body | Comment | From and subject fields | Message body | Comment
__________________________________________________________________________________________________________________________________________________
utf-8 | Bad | Bad | Bad | Bad | Bad | Bad
ISO-8859-1 | Bad | Good | Poor | Good | Good | The best
No setting | Not tested | Not tested | Bad | Bad | Bad | Bad

The bottom line is that:
- the page setting, that is, the <META http-equiv="Content-Type" content="text/html; charset=xxxx"> setting, matters,
- the ISO-8859-1 page setting is better than the utf-8 page setting.

I am quite puzzled by the results and suspect FormMail to behave wrongly. Indeed I might have missed something but if so, would like to know what.

Please, tell me.

Best regards.

russellr
16-May-2009, 07:44 PM
Hi,

I had trouble reading your summary, but I gather that this works best:


<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
in the page header, plus this instruction to FormMail:



<input type="hidden" name="mail_options" value="CharSet=ISO-8859-1" />
And that the only problem is with the email headers (From and Subject, specifically).

If I've understood the situation correctly, then the problem is twofold:
The content-type inside an email does not affect the header fields. That's the way the email standard is specified.
The email standard does specify a way to handle international header fields, but FormMail doesn't yet have that feature.

Totila
17-May-2009, 07:44 AM
Thank you for your prompt reply. I am sorry for not having being clear enough.

I noticed that the best settings, so far, are:
- <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
in the page header,
- plus this instruction to FormMail:
<input type="hidden" name="mail_options" value="CharSet=utf-8" />.

What I wanted to point out is that:
- surprinsingly, the best page header setting is ISO-8859-1 rather than utf-8,
- and, in addition to my previous message, when I tried the different settings, I had to quit my email client reader then relaunch it for every trial as if there was some variables initialisations problems. This was true with both Eudora and Thunderbird.

Best regards.

russellr
17-May-2009, 11:42 PM
Hi,



- surprinsingly, the best page header setting is ISO-8859-1 rather than utf-8,
Yes, but I think "best" still did not give you proper email headers. We're actually working on that feature now.



- and, in addition to my previous message, when I tried the different settings, I had to quit my email client reader then relaunch it for every trial as if there was some variables initialisations problems. This was true with both Eudora and Thunderbird.
Sounds like bugs in your email program - not anything to do with FormMail.