5
我在我的ZF項目下面的代碼:Zend搜索Lucene和波斯語言!
$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);
}
時執行的var_dump輸出 - > 字符串(39) 「سیناجانXXX傷心」
當我用戶utf_decode string(25)「س ?ا ?س ? ?xxx xxx sad」
如何正確解碼! ?:(
我已經使用這個SOF quesion解決方案! - >lucene encoding problem in zend framework
而不是作品和通知附加誤差約的iconv
plz幫助:)
薩拉姆,男人數據RO AZ數據庫miaram VA ghabl AZ指數kardanesh dorost neshun酰胺瓦利vaghti documentam RO指數mikonam VAŸreshteË波斯語搜索mikonam natije我我nemibinam,主意ii達林? – 2014-12-30 07:29:32
@SamiraKhorshidi lotf kon finglish nanevis inja ... lotfan biain to gmail ... codeton ro bayad bebinam [email protected] – 2014-12-30 18:54:04
mamnun,moshkel hal shod inam rahe hal :) https://stackoverflow.com/questions/5834861/ lucene-encoding-problem-in-zend-framework/5834910#5834910 – 2014-12-31 07:30:37