[ZCM] [ZC] 227/ 4 Comment "TextIndex: Can't index unicode strings"

Collector: Zope Bugs and Patches ... zope-coders@zope.org
Sun, 17 Feb 2002 17:01:39 -0500


Issue #227 Update (Comment) "TextIndex: Can't index unicode strings"
 Status Pending, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/227

==============================================================
= Comment - Entry #4 by snej on Feb 17, 2002 5:01 pm

The UnicodeSplitter should be able to index UnicodeStrings, though? The workaround you describe works, as described below.

________________________________________
= Comment - Entry #3 by ajung on Feb 17, 2002 3:14 pm

Are you using the UnicodeSplitter ? If you have different encoding
than ASCII either change the default encoding in site.py or
set <index>_encoding to the encoding of the document.


________________________________________
= Comment - Entry #2 by snej on Feb 17, 2002 2:59 pm


Uploaded:  "patsch"
 - http://collector.zope.org/Zope/227/patsch/view
A test for tests/testTextIndex.py



________________________________________
= Request - Entry #1 by snej on Feb 17, 2002 2:40 pm

index_object() of TextIndex.py raises a 
UnicodeError: ASCII encoding error: ordinal not in range(128)
for strings containing actually non-ASCII unicode,
because it applies str() on all input.

Workaround: Use xxx_encoding to pass unicode 
in an encoding into the TextIndex.




==============================================================