[TYPO3-core] Correction to charset setting in t3lib_htmlmail

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Thu May 18 09:47:48 CEST 2006


Stanislas Rolland schrieb:
> Martin Kutschker a écrit :
> [...]
> 
>>
>> If you default to metaCharset all TSFE methods that work on the mail 
>> data will use charset X, but the mail will be flagged Y. The charset 
>> of the mail data may actually *be* in Y (depending on what your code 
>> does), but TYPO3 will *treat* it as X.
>>
> 
> Here is a new version of the patch.
> 
> I agree with you that if metaCharset is different than renderCharset,
> the script that invokes t3lib_htmlmail needs to apply the conversion to
> the content of the mail, since t3lib_htmlmail does not take care of this
> conversion as I think it should. Perhaps this would require an 
> additional patch.

Well, +1. But I still think TSFE->renderCharset is the more correct 
version. Since I have no idea how many sites really use different charsets, 
I have to admit this version is better than the current situation.

So folks, what does this patch? It uses TSFE->metaCharset (instead of 
TSFE->config[metaCharset]), so we will always get the metaCharset of the 
FE. And you can set the charset of your choice, if you set the 
$mailer->charset (after class instantiation) by yourself.

Masi



More information about the TYPO3-team-core mailing list