I have the following code in my zf project:
$index = Zend_Search_Lucene::open(APPLICATION_PATH . '/cache/search_index');
$doc = new Zend_Search_Lucene_Document();
$title = "سلام سینا xxx sad";
$doc->addField(Zend_Search_Lucene_Field::Text('title', $title));
$index->addDocument($doc);
$index->commit();
$index->optimize();
echo "Index contains " . $index->count() . " documents.\n\n";
$results = $index->find('xxx');
foreach ($results as $res) {
var_dump($res->title);
}
when var_dump does the output → line (39) "سی † † ا جا † † xxx sad"
when user user utf_decode line (25) "س? ا? س ?? ا xxx sad"
how can i decode this correctly !: (
I already used the solution in this SOF question - > lucene coding problem in zend framework
but not working and iconv notification error added!
Help plz :)
source
share