[TYPO3-core] RFC: utf8 in log files
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Mon Dec 11 11:40:37 CET 2006
Franz Holzinger schrieb:
> Hello Martin,
>
>
>>+ if ($this->config['config']['stat_apache_niceTitle'] == 'utf-8') {
>>+ $shortTitle = $this->csConvObj->utf8_encode($this->page['title'],$this->renderCharset);
>>+ } elseif ($this->config['config']['stat_apache_niceTitle']) {
>> $shortTitle = $this->csConvObj->specCharsToASCII($this->renderCharset,$this->page['title']);
>> } else {
>> $shortTitle = $this->page['title'];
>> }
>>- $shortTitle = substr(preg_replace('/[^.[:alnum:]_-]/','_',$shortTitle),0,30);
>>+ $len = t3lib_div::intInRange($this->config['config']['stat_apache_pageLen'],1,100,30);
>>+ if ($this->config['config']['stat_apache_niceTitle'] == 'utf-8') {
>>+ $shortTitle = rawurlencode($this->csConvObj->substr('utf-8',$shortTitle,0,$len));
>>+ } else {
>>+ $shortTitle = substr(preg_replace('/[^.[:alnum:]_-]/','_',$shortTitle),0,$len);
>>+ }
>
>
>
>
>>+ } else {
>>+ $this->config['stat_vars']['pageName'] = str_replace('[path]', preg_replace('/[^.[:alnum:]\/_-]/','_',$path.'/'), $pageName);
>>+ }
>>
>
>
> You have skipped the replacedment into '_' for utf-8. Any reason?
The point was the point, to get real names not a bunch of underscores.
> Is any special database encoding in UTF-8 needed to test this?
No, it will simply convert the current charset to utf8.
Masi
More information about the TYPO3-team-core
mailing list