[Zope-CMF] pb with unicode

Sylvain Thénault Sylvain Thénault
Mon, 16 Dec 2002 11:08:01 +0100


On Friday 13 December à 23:12, Dieter Maurer wrote:
> Sylvain Thénault writes:
>  > hi
>  > 
>  > I've a problem with unicode attribute : I've an object with some unicode
>  > attributes, and when this object is added to a folder an exception
>  > occurs when the object get cataloged : 
>  > 
>  >   Module OFS.ObjectManager, line 272, in _setObject
>  >   Module Products.CMFCore.CMFCatalogAware, line 146, in manage_afterAdd
>  >   Module Products.CMFCore.CMFCatalogAware, line 41, in indexObject
>  >   Module Products.CMFCore.CatalogTool, line 239, in indexObject
>  >   Module Products.CMFCore.CatalogTool, line 232, in catalog_object
>  >   Module Products.ZCatalog.ZCatalog, line 500, in catalog_object
>  >   Module Products.ZCatalog.Catalog, line 347, in catalogObject
>  >   Module Products.PluginIndexes.TextIndex.TextIndex, line 315, in
>  > index_object
>  >   Module Products.PluginIndexes.TextIndex.GlobbingLexicon, line 246, in
>  > Splitter UnicodeError: ASCII encoding error: ordinal not in range(128)
>  > 
>  > I'm using Zope 2.6.0 and CMF 1.3. Plone default encoding is set to
>  > iso-8859-1.
> Tell this Python also.
> 
> This is done in a file "sitecustomize.py" (see "site.py" for a
> documentation) with "sys.setdefaultencoding(...)".

I know about this file but I want to specify encoding only for Zope...
isn't there a way to do that without setting encoding for all others
python applications ? 

-- 
Sylvain Thénault

  LOGILAB           http://www.logilab.org