[TYPO3-core] RFC: utf8 in log files

Franz Holzinger franz at fholzinger.com
Mon Dec 11 11:28:17 CET 2006


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?

Is any special database encoding in UTF-8 needed to test this?


- Franz






More information about the TYPO3-team-core mailing list