Comment 8 for bug 267356

Revision history for this message
Danilo Dellaquila (ddellaquila) wrote :

Plone 3.2.2 and CMFCore 2.1.2 reported the same error while using spanish accented letters.

I have fix it using unicode() constructor to create a Unicode string. This is the patch:

--- eggs/Products.CMFCore-2.1.2-py2.4.egg/Products/CMFCore/ActionInformation.py.orig 2010-03-22 12:36:14.000000000 +0100
+++ eggs/Products.CMFCore-2.1.2-py2.4.egg/Products/CMFCore/ActionInformation.py 2010-03-22 12:37:37.000000000 +0100
@@ -148,7 +148,7 @@
             elif id == 'i18n_domain':
                 continue
             elif self.i18n_domain and id in ('title', 'description'):
- val = Message(str(val), self.i18n_domain)
+ val = Message(unicode(val, encoding='utf-8'), self.i18n_domain)
             lazy_map[id] = val

         return (lazy_map, lazy_keys)

Danilo