[Zope-CMF] Metadata Tool stores in non-unicode

Jens Vagelpohl jens at dataflake.org
Wed Aug 30 09:28:25 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 30 Aug 2006, at 15:03, Tim Terlegård wrote:
> 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:
>     print type(subject)
>
> 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?

What I mean is that the metadata tool won't change the string type  
itself. Without looking closer, I'm thinking the problem here is most  
likely the input form for the ZMI.

If you could, please file a feature request with the description you  
gave:

http://www.zope.org/Collectors/CMF

Further discussion can happen on that collector issue. List messages  
tend to get lost or forgotten.

jens

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE9ZJ9RAx5nvEhZLIRAk9nAJ98GpKDM0XMPXrYTdqjKmb4cJ8/IgCfWKvB
hEYv41UaoHJRWZCTPuPzt5s=
=1hJ4
-----END PGP SIGNATURE-----


More information about the Zope-CMF mailing list