[TYPO3-core] Correction to charset setting in t3lib_htmlmail
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Tue May 9 16:13:28 CEST 2006
Stanislas Rolland schrieb:
> Martin Kutschker a écrit :
>
>> Stanislas Rolland schrieb:
>>
>>> and cannot submit a patch that will make it default to
>>> $GLOBALS['TSFE']->renderCharset.
>>
>> Why?
>
> Because I cannot agree. I think that an html mail is similar to FE
> output and should use the same charset... unless we introduce a new
> config.htmlmailCharset property as we have for notification mails.
Then use TSFE->metaCharset. It will always be set (see TSFE->initLLvars).
Of course I still promote my patch (with either TSFE->metaCharset or
TSFE->renderCharset) because of the added set-charset feature :-)
But, methinks you still don't get the difference between metaCharset and
renderCharset.
Consider the following situation:
Data in the DB is in charset X. So we set renderCharset to X. But for some
reason we want the output of the page in charset Y. So we set metaCharset
to Y. TYPO3 will now for all string operations (eg case shifting, trimming
etc) assume charset X (which is correct). Finally it will convert the
*complete* page into charset Y.
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.
Masi
More information about the TYPO3-team-core
mailing list