Re: [Zope-dev] ZCatalog: updateMetadata and comparing string and unicode

2008-03-06 Thread Dieter Maurer
Maurits van Rees wrote at 2008-3-5 23:57 +: ... I have an item in the portal_catalog of my Plone site that has some string as description. The real object meanwhile has had a code change so the description field now returns unicode. When I now recatalog that object it throws an error:

Re: [Zope-dev] ZCatalog: updateMetadata and comparing string and unicode

2008-03-06 Thread Benji York
Dieter Maurer wrote: sys.setdefaultencoding is only available at startup. Thus, setting defaultencoding must happen in a sitecustomize or site module. Or if you're sufficiently devious, it's available any time (not that actually using it is a good idea, but...): import sys

[Zope-dev] ZCatalog: updateMetadata and comparing string and unicode

2008-03-05 Thread Maurits van Rees
Hi all, I have an item in the portal_catalog of my Plone site that has some string as description. The real object meanwhile has had a code change so the description field now returns unicode. When I now recatalog that object it throws an error: Module Products.ZCatalog.Catalog, line 359, in