Project

General

Profile

Actions

Bug #17169

closed

word spit incorrectly works with UTF-8 texts

Added by Dimitriy Simakov over 17 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2007-03-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Some letters in utf-8 texts are cut, when displayed in search results. This can be fixed by adding 'u' modifier to preg_replace call in function markupSWpartsOfString:
$str = preg_replace('/\s\s+/u',' ',$str);

However, this is not considered as final solution. Probably it's better to use mb_ereg_replace instead of preg_replace

--- class.tx_indexedsearch.php.old Thu Mar 29 18:16:10 2007
+++ class.tx_indexedsearch.php Thu Mar 29 18:15:58 2007
@ -1966,7 +1966,7 @

// Init:
$str = str_replace(' ',' ',t3lib_parsehtml::bidir_htmlspecialchars($str,-1));
- $str = preg_replace('/\s\s+/',' ',$str);
+ $str = preg_replace('/\s\s+/u',' ',$str);
$swForReg = array();
// Prepare search words for regex:

(issue imported from #M5322)

Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from Accepted to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.1

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Martin Kutschker)

No feedback for over 90 days.

Actions

Also available in: Atom PDF