> >The Metadata Tool seems to store strings using the str type. I'd
> >like to
> >have them stored in unicode. For instance
> >returns a tuple with str-ojects, I'd like a tuple with unicode-
> >Other people than me must have been bitten by this? How do I resolve
> I just looked at the code and cannot see any conversion that converts
> to normal strings. Can you be a bit more clear and describe exactly
> what you did, what the expected outcome was supposed to be, and what
> outcome you got instead?
I go to ZMI -> portal_metadata -> Elements -> Subjects, then I add a few
values to a vocabulary. By printing the values in
CMFDefault/MetadataTool.py/MetadataElementPolicy/edit() I can see that
they are of str type, not unicode. I don't know by which type they are
supposed to be stored, but it seems to me it's not unicode.
Later I do something like:
mtool = getToolByName(self, 'portal_metadata'(
subjects = mtool.listAllowedSubjects(content_type='Event')
for subject in subjects:
If I print what's in subjects I can see those are of type str.
Do you mean that the metadata tool should store everything in unicode?
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests