Bug #15902 ยป iconv-php4-typo3-4rc2.diff

Administrator Admin, 2006-03-27 10:58

View differences:

t3lib/class.t3lib_cs.php 27 Mar 2006 08:57:24 -0000
1344 1344
			else {
1345 1345
				return mb_substr($string,$start,$len,$charset);
1346 1346
			}
1347
		} elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'iconv')	{
1347
		} elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'iconv' && function_exists('iconv_substr'))	{
1348 1348
				// cannot omit $len, when specifying charset
1349 1349
			if ($len==null)	{
1350 1350
				$enc = iconv_get_encoding('internal_encoding');	// save internal encoding
......
1384 1384
	function strlen($charset,$string)	{
1385 1385
		if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'mbstring')	{
1386 1386
			return mb_strlen($string,$charset);
1387
		} elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'iconv')	{
1387
		} elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'iconv' && function_exists('iconv_strlen'))	{
1388 1388
			return iconv_strlen($string,$charset);
1389 1389
		} elseif ($charset == 'utf-8')	{
1390 1390
			return $this->utf8_strlen($string);
......
1698 1698
	function utf8_strpos($haystack,$needle,$offset=0)	{
1699 1699
		if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'mbstring')	{
1700 1700
			return mb_strpos($haystack,$needle,$offset,'utf-8');
1701
		} elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'iconv')	{
1701
		} elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'iconv' && function_exists('iconv_strpos'))	{
1702 1702
			return iconv_strpos($haystack,$needle,$offset,'utf-8');
1703 1703
		}
1704 1704

  
......
1723 1723
	function utf8_strrpos($haystack,$needle)	{
1724 1724
		if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'mbstring')	{
1725 1725
			return mb_strrpos($haystack,$needle,'utf-8');
1726
		} elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'iconv')	{
1726
		} elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'iconv' && function_exists('iconv_strrpos'))	{
1727 1727
			return iconv_strrpos($haystack,$needle,'utf-8');
1728 1728
		}
1729 1729

  
    (1-1/1)