Re: Problem indexin accented characters.
"Itamar Syn-Hershko" <[email protected]>
| Newsgroups | gmane.comp.jakarta.lucene.clucene.devel,gmane.comp.apache.commons.general |
|---|---|
| Message-ID | <3F3DB3D86C7846D994C93437EDE6BB88@hp6690ej01> |
Looks like an encoding issue. Is the file being read correctly (check with your debugger)? Also, please post such questions to the CLucene user group. Itamar. > -----Original Message----- > From: Itziar Cortes [mailto:[email protected]] > Sent: Sunday, June 20, 2010 12:21 PM > To: general-PPu3vs9EauNd/SJB6HiN2Ni2O/[email protected] > Subject: Problem indexin accented characters. > > Hi all! > > I have a little problem with CLucene when I try to index > accented characters. I need index characters like ñ, è, ü, or > ó. I use Luke to see the indexed data. > > I tried this, and I had no problem: > > pDoc->add(*new Field(_T("field"), _T("a b ñ c d"), > Field::STORE_YES | Field::INDEX_TOKENIZED)); > > > The problem begins when I tried read from a file, and index > each line. For example, > > wifstream file; > wstring lineread; > while(std::getline(file, lineread)){ > pDoc->add(*new Field(_T("testua"), lineread.c_str(), > Field::STORE_YES > | Field::INDEX_TOKENIZED)); > > It only index "a" and "b". > > > How can I solve this problem? > > Thanks in advance, > > Best regards, > > -- > Itziar > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo