Hi, I'm currently using TextIndexNG-1.09 with my Zope site (2.6.1 release). I've created an Index with the following stteing : - attribute name: title - encoding: iso-8859-15 - stemmer: disabled - casefolding: enabled - index single characters: disabled - default query parser: PyQueryParser - stopwords: None - normalizer: french - compressed lists: disabled - use converters: disabled - similarity search: disabled When I enter a phrase query on this index (using double quotes) with some accentuated characters (like "département"), I raise an exception : UnicodeError: ASCII encoding error: ordinal not in range (128). The same query without quotes doesn't fail. Any idea ?? Thanks, Thierry -- Linux every day, keeps Dr Watson away... http://gpc.sourceforge.net -- http://www.ulthar.net
Please provide the full traceback. -aj --On Mittwoch, 11. Juni 2003 15:54 Uhr +0200 Thierry FLORAC <thierry.florac@onf.fr> wrote:
Hi,
I'm currently using TextIndexNG-1.09 with my Zope site (2.6.1 release). I've created an Index with the following stteing : - attribute name: title - encoding: iso-8859-15 - stemmer: disabled - casefolding: enabled - index single characters: disabled - default query parser: PyQueryParser - stopwords: None - normalizer: french - compressed lists: disabled - use converters: disabled - similarity search: disabled
When I enter a phrase query on this index (using double quotes) with some accentuated characters (like "département"), I raise an exception : UnicodeError: ASCII encoding error: ordinal not in range (128).
The same query without quotes doesn't fail.
Any idea ??
Thanks,
Thierry
-- Linux every day, keeps Dr Watson away... http://gpc.sourceforge.net -- http://www.ulthar.net
Thierry FLORAC wrote at 2003-6-11 15:54 +0200:
... When I enter a phrase query on this index (using double quotes) with some accentuated characters (like "département"), I raise an exception : UnicodeError: ASCII encoding error: ordinal not in range (128).
The same query without quotes doesn't fail.
I hate these "encoding error" and get rid of them by setting Python's default encoding in "sitecustomize.py" to our default encoding. Dieter
--On Mittwoch, 11. Juni 2003 20:56 Uhr +0200 Dieter Maurer <dieter@handshake.de> wrote:
Thierry FLORAC wrote at 2003-6-11 15:54 +0200:
... When I enter a phrase query on this index (using double quotes) with some > accentuated characters (like "département"), I raise an exception : > UnicodeError: ASCII encoding error: ordinal not in range (128). > The same query without quotes doesn't fail.
I hate these "encoding error" and get rid of them by setting Python's default encoding in "sitecustomize.py" to our default encoding.
But this would should a misbehaviour of the application since this error show never occur with TextIndexNG :-) -aj
Dieter Maurer wrote:
Thierry FLORAC wrote at 2003-6-11 15:54 +0200:
... When I enter a phrase query on this index (using double quotes) with some accentuated characters (like "département"), I raise an exception : UnicodeError: ASCII encoding error: ordinal not in range (128).
The same query without quotes doesn't fail.
I hate these "encoding error" and get rid of them by setting Python's default encoding in "sitecustomize.py" to our default encoding.
I never got my head around how to use these... What do you change and what have you changed it to? cheers, Chris
Chris Withers wrote at 2003-6-12 14:54 +0100:
Dieter Maurer wrote:
Thierry FLORAC wrote at 2003-6-11 15:54 +0200:
... When I enter a phrase query on this index (using double quotes) with some accentuated characters (like "département"), I raise an exception : UnicodeError: ASCII encoding error: ordinal not in range (128).
The same query without quotes doesn't fail.
I hate these "encoding error" and get rid of them by setting Python's default encoding in "sitecustomize.py" to our default encoding.
I never got my head around how to use these...
What do you change and what have you changed it to?
My sitecustomize.py looks like: import sys sys.setdefaultencoding('iso-8859-1') Nowadays, "iso-8859-15" would be more correct (it contains the Euro sign). Dieter
Dieter Maurer wrote:
I hate these "encoding error" and get rid of them by setting Python's default encoding in "sitecustomize.py" to our default encoding.
I never got my head around how to use these...
What do you change and what have you changed it to?
My sitecustomize.py looks like:
And where does it live? cheers, Chris
participants (4)
-
Andreas Jung -
Chris Withers -
Dieter Maurer -
Thierry FLORAC