#2634: [search-api] Lucene issues with UTF
---------------------------------------------+------------------------------
Reporter: Scater | Owner:
Status: new | Component: Contrib
apps
Version: other branch | Resolution:
Keywords: search-api;beck;lucene;index; | Stage: Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
---------------------------------------------+------------------------------
Comment (by jelle):
I agree that this is an major show stopper for this otherwise very nice
addition.
Its really a pity that Unicode isn't supported, that's such a severe error
that it renders this effort pretty useless I'm afraid...
Which is really too bad, since it sure has a huge potential!
Here's a traceback:
In [4]: models.indexer.update()
---------------------------------------------------------------------------
<type 'exceptions.UnicodeEncodeError'> Traceback (most recent call
last)
c:\Jelle_prive\Jelle_dev\workspace\JakobMacfarlane\src\jm_book_site\<ipython
console> in <module>()
c:\Python25\lib\site-packages\django\contrib\search\lucene.py in
update(self, documents)
53 for document in update_queue:
54 self.delete(document)
---> 55 self.index(document)
56
57 if close:
c:\Python25\lib\site-packages\django\contrib\search\lucene.py in
index(self, row)
102 # newlines solves this.
103 contents = '\n'.join([str(getattr(row, field.name)) for
field in \
--> 104 self.text_fields])
105 # FIXME: Hardcoded 'contents' field.
106 document.add(PyLucene.Field('contents', contents,
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode
character u'\u2019' in position 224: ordinal not in r
ange(128)
In [5]:
--
Ticket URL: <http://code.djangoproject.com/ticket/2634#comment:6>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---