Fix encoding error in migration procedure, otherwise migration procedure breaks on joining output list in case we have there any non-ascii characters. [piv]

svn path=/plone.app.discussion/trunk/; revision=36844
This commit is contained in:
Timo Stollenwerk 2010-05-31 09:58:42 +00:00
parent 4f13054ae4
commit 3d22bc56c4
2 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,9 @@ Changelog
1.0b5 (unreleased)
------------------
* Fix encoding error in migration procedure, otherwise migration procedure
breaks on joining output list in case we have there any non-ascii characters.
[piv]
* plone.z3cform 0.6.0 compatibility (fix maximum recursion depth error which
appears with plone.z3cform higher than 0.5.10)

View File

@ -48,6 +48,9 @@ class View(BrowserView):
dtool = context.portal_discussion
def log(msg):
# encode string before sending it to external world
if isinstance(msg, unicode):
msg = msg.encode('utf-8')
context.plone_log(msg)
out.append(msg)