[TYPO3-core] RFC: fix bug #3600 - config.formMailCharset

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Jul 10 10:35:37 CEST 2006


Martin Kutschker schrieb:
> Hi!
> 
> Bugfix for HEAD and TYPO3_4-0
> 
> Problem: The TS setting config.formMailCharset doesn't work

Additional problem. When using different charsets for config.metaCharset 
and config.renderCharset the mail is sent in renderCharset. This may be a 
bit confusing. Stanislas wanted to use metaCharset in t3lib_htmlmail, but 
here is the correct place for it (incl. the charset-conversion).

> Solution:

Part 0:

Use metaCharset for mail and convert data from renderCharset to metaCharset 
(see "Part 2" below).

> Part 1:
> Now that the t3lib_htmlmail charset fix is in it is possible to set the 
> charset of the mail. This is done by calling the parent's start() and 
> then checking for config.formMailCharset.

Note: config.formMailCharset overrides config.metaCharset

> Part 2:
> To make the setting really work it is necessary to convert the charset 
> from the form into the desired mail charset. The patch does this. Note 
> that renderCharset is used because TYPO3 (see index_ts) does 
> automatically convert the sent data (metaCharset) into the internal 
> charset (renderCharset).

More new stuff of the patch:

The charset is now normalized with $GLOBALS['TSFE']->csConvObj->parse_charset.

The class doesn't convert empty strings any more.

> Testing:
> 
> Set up a FORM or form content element and set config.formMailCharset to 
> any desired charset.

New: set different values for metaCharset and renderCharset and/or set 
formMailCharset.

Masi
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t3lib_formmail-charset-v2.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060710/08a966b6/attachment.diff 


More information about the TYPO3-team-core mailing list