I have a strange problem. I'm using the rmail
class from Richard Heyes to send mails. This class works always as expected. Now I encountered a strange problem with special chars. Special chars were never a problem until now.
I have:
$this->mailEncoding = 'UTF-8';
$email->setHeadCharset($this->mailEncoding);
$email->setTextCharset($this->mailEncoding);
$email->setHTMLCharset($this->mailEncoding);
In this case the subject is a string like:
...ont été acceptée(s)
The subject is used as Mail-Subject (top) and then in content again
This is an image of the received mail in apple mail.
You see that the content is ok. In the subject été is ok too but acceptée(s) is not.
Now when I enter:
...ont été acceptétée(s)
I get (it works):
I tried several combinations. E.g "à" works. It seems that only "ée" is a problem
RAW:
00 : 56 6f 74 72 65 2f 76 6f 73 20 6d 61 6e 69 66 65 [Votre/vos manife]
10 : 73 74 61 74 69 6f 6e 73 28 73 29 20 6f 6e 74 20 [stations(s) ont ]
20 : c3 a9 74 c3 a9 20 61 63 63 65 70 74 c3 a9 65 28 [..t.. accept..e(]
30 : 73 29 2e [s).
The input file is valid UTF-8, but this is what your mail client reads:
...
Subject: [...] acceptÃ=?UTF-8?Q?=A9?=e.
...
Let's try to interpret your resource with different encodings:
Votre/vos manifestations(s) ont été acceptée(s). // CP-1252
Votre/vos manifestations(s) ont été acceptée(s). // UTF-8
The Ã
is written verbatim in the field body, while U+00A9
is the code point for the copyright symbol. We can't tell for sure, but either you do something wrong with the string (can you check your code and attach any transformation?), or it may be a problem with the MIME message builder, which, as fare as I understand, is some rmail library (but I could not find it, so can't test against it)