[Zope3-checkins] CVS: Zope3/lib/python/Zope/TextIndex - Lexicon.py:1.2
Guido van Rossum
guido@python.org
Wed, 4 Dec 2002 03:10:12 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/TextIndex
In directory cvs.zope.org:/tmp/cvs-serv29335
Modified Files:
Lexicon.py
Log Message:
Make it work with Unicode.
=== Zope3/lib/python/Zope/TextIndex/Lexicon.py 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/TextIndex/Lexicon.py:1.1 Tue Dec 3 09:28:15 2002
+++ Zope3/lib/python/Zope/TextIndex/Lexicon.py Wed Dec 4 03:10:11 2002
@@ -145,7 +145,7 @@
def _text2list(text):
# Helper: splitter input may be a string or a list of strings
try:
- text + ""
+ text + u""
except:
return text
else:
@@ -156,8 +156,8 @@
class Splitter:
import re
- rx = re.compile(r"(?L)\w+")
- rxGlob = re.compile(r"(?L)\w+[\w*?]*") # See globToWordIds() above
+ rx = re.compile(r"(?u)\w+")
+ rxGlob = re.compile(r"(?u)\w+[\w*?]*") # See globToWordIds() above
def process(self, lst):
result = []