[Product-Developers] z3c.form - unicode problem

ucalligaro u.calligaro at tecnoteca.com
Wed Mar 28 15:23:16 UTC 2012


Hi,

I've a problem with unicode and z3c.form.
This is my scenario: I've a custom contet type (CT) based on Archetypes. 
I've made a z3c.form Form to let anonymous users edit data and the form
fields are generated from the interface of the CT. 
When I call the form with "ignoreContext=False" if there's a special
character (something like "è","à", etc. ) in the description field, I get
this error:

2012-03-28T16:00:31 ERROR Zope.SiteErrorLog 1332943231.380.770318914895
http://localhost:8080/.../my-contentype/@@add-update-event
Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module plone.z3cform.layout, line 70, in __call__
  Module plone.z3cform.layout, line 54, in update
  Module tecnoteca.associations.forms.add_update_event, line 36, in update
  Module z3c.form.form, line 208, in update
  Module plone.z3cform.patch, line 21, in BaseForm_update
  Module z3c.form.form, line 149, in update
  Module tecnoteca.associations.forms.add_update_event, line 43, in
updateWidgets
  Module z3c.form.form, line 134, in updateWidgets
  Module z3c.form.field, line 275, in update
  Module z3c.form.browser.textarea, line 36, in update
  Module z3c.form.browser.widget, line 70, in update
  Module z3c.form.widget, line 123, in update
  Module z3c.form.converter, line 43, in toWidgetValue
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 21:
ordinal not in range(128)


How can I fix this problem?

Thanks

Umberto Calligaro

--
View this message in context: http://plone.293351.n2.nabble.com/z3c-form-unicode-problem-tp7414069p7414069.html
Sent from the Product Developers mailing list archive at Nabble.com.


More information about the Product-Developers mailing list