Issues

ZF-6041: Query Highlighting has problems with non-ASCII characters

Issue Type: Bug Created: 2009-03-16T08:42:53.000+0000 Last Updated: 2009-09-17T14:13:25.000+0000 Status: Resolved Fix version(s): Reporter: Ben Scholzen (dasprid) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Search_Lucene

Related issues: - ZF-3629

Attachments:

Description

Testcase:

<pre class="highlight">
<?php
error_reporting(E_ALL | E_NOTICE);

require_once 'Zend/Search/Lucene.php';
require_once 'Zend/Search/Lucene/Search/QueryParser.php';

/**
 * The following gives a notice locally:
 * Notice:  iconv() [function.iconv]: Detected an illegal character in input
 * string in library/Zend/Search/Lucene/Field.php on line 221
 */
$query = Zend_Search_Lucene_Search_QueryParser::parse('*test*', 'utf-8');

/**
 * This should output "Übergrößes Bild - Test", but it doesn't
 */
echo "\n\n"
     . html_entity_decode(strip_tags($query->highlightMatches('Übergroßes Bild - Test')), ENT_COMPAT, 'UTF-8')
     . "\n\n";

Comments

Posted by Alexander Veremyev (alexander) on 2009-04-30T02:57:46.000+0000

Issue actually duplicates [ZF-3629]. The problem is in the DOMText::splitText() method. It needs binary offset instead of UTF-8 characters offset.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts