[TYPO3-core] declare(encoding='UTF-8'); in extension config files

Jigal van Hemert jigal.van.hemert at typo3.org
Mon Feb 25 11:30:34 CET 2013


Hi,

On 25-2-2013 11:01, Christian Weiske wrote:
> Since PHP 5.3.0, developers may declare the character set of a PHP file
> using a declare line at the beginning of a file[1]:
[...]
> Helmut Hummel is in favor[2] of simply declaring the declare()
> statements as "not allowed" in ext_localconf.php/ext_tables.php files,
> thus making the issue a non-issue by ignoring it.

I agree with Helmut and would even go a step further and declare them as 
not allowed in all PHP source files. IMO there is not need for them 
because the CGL already mentions:
"All TYPO3 source files use the UTF-8 character set without byte order 
mark (BOM) since version 4.5." [1]

Extensions should follow the CGL too.

[1] 
http://docs.typo3.org/typo3cms/CodingGuidelinesReference/PhpFileFormatting/GeneralRequirementsToPhpFiles/Index.html

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-team-core mailing list