collective / iwwb.eventlist

iwwb.eventlist
http://pypi.python.org/pypi/iwwb.eventlist
0 stars 0 forks source link

Unicode support :-) #5

Closed pysailor closed 12 years ago

pysailor commented 12 years ago

Hi,

when you enter non-ASCII characters in the fields for keywords or city (e.g. Koroška or München) and perform a search, a UnicodeDecodeError is thrown.

In iwwb.eventlist.searcher.get_results(), the parameters in query are of type string, not Unicode, and they are passed this way to the client service.

(Pdb) query
{'query': ['Koro\xc5\xa1ka'], 'type': '0', 'startDate': '2012-02-25', 'endDate': '2012-03-03', 'city': 'M\xc3\xbcnchen'}
domenkozar commented 12 years ago

I have talked to @davisagli and z3c.form should decode all request form values to unicode. Haven't figured out why yet, but monkeypatches from plone.z3cform do get applied (zope.form.form.BaseForm.update is responsible then for decoding). Needs more investigation.