[TYPO3-core] RFC #8578: Umlauts get displayed wrong in Web>Access module after updating rights

Tobias Liebig liebig at networkteam.com
Mon Jun 9 18:23:42 CEST 2008


Martin Kutschker schrieb:
> Tobias Liebig schrieb:
>>       */
>>      public function __construct() {
>> +                    // get charset from current ajax request (which 
>> is expected to be utf-8)
>> +                preg_match('/.*; charset=(.*)$/i', 
>> strtolower($_SERVER["CONTENT_TYPE"]), $contenttype);
>> +            // $contenttype[1] now contains the charset we recieved 
>> by the post/ajax request
> 
> In addition to my answer to #8591 a suggestion for the regep:
> 
> /;\w*charset\w*=\w*([a-zA-Z0-9_-])/
 >
> No need to bind to match anything prior to the semi colon.
> 

thanks for your hints! Your're right, so i optimize the regExp

/;\s*charset\s*=\s*([a-zA-Z0-9_-]*)/
did the job.

i'll prepare a patch and post it later today




More information about the TYPO3-team-core mailing list