[TYPO3-core] RFC: Respect target if specified in file header
Holzinger Franz
franz at fholzinger.com
Thu Dec 1 19:45:50 CET 2005
Hello Michael,
I think this is a useful feature. Of course it would be better if all
files were converted automatically, however on big sites this is not
easily managable.
>boolean If true, the charset auto-conversion will be skipped
>
Reverse this into positive logic which is more understandable. ==>
conversion will be done
>+ // Get the first two lines of the file
>+ preg_match('/^.*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r][^\n\r]*/',$content, $match);
>
These are more than two lines.
>$internalCharset='iso-8859-1'; // Default charset of BE and FE
>
This should not be hardcoded here. Use a global variable.
>
>- The five-line detection works but is ugly. If anybody has a better way for
>this, please let me know.
>
>
This is understandable.
>
>- I am undecided whether PHP files should be converted, too (e.g. when
>editing them in the Extension Manager). Any suggestions?
>
>
Yes, otherwise it would not be usable. But before writing them down they
need to be converted back again.
>- I did not find any examples but fear that there are calls of these
>functions where the CS conversion should be skipped. In this case, please
>change these functions and submit the $noCSconv parameter (see
>t3lib_div::getUrl() and t3lib_div::writeFile()).
>
>
>
This conversion should be skipped by default because in most cases this
is not needed at all.
>$GLOBALS['TYPO3_VAR']['SYS']['fileCharsetAutoConcv'];
>
>
Regards,
Franz
More information about the TYPO3-team-core
mailing list