Five.browser.decode.processInputs and ZTUtils.Zope.make_query collide because of non-ASCII characters
Bug #160979 reported by
Daniel Nouri
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Low
|
Unassigned |
Bug Description
When Five.browser.
qlist[i] = '%s%s=%s' % (uq(k), m, uq(str(v)))
Obviously, str(v) will pretty quickly result in a UnicodeError. To find out the appropriate encoding, one has to probably go back to negotiating the charset.
Changed in zope2: | |
importance: | Undecided → Low |
status: | New → Confirmed |
To post a comment you must log in.
This affects a number of sites I am running which use Greek as a language in utf-8 encoding.
I temporarily fix this by adding:
if isinstance(v, unicode):
v = v.encode('utf-8')
before qlist[i] = '%s%s=%s' % (uq(k), m, uq(str(v))) is called. harsets utility to get the encoding and modify the above accordingly.
Supposedly one should use IUserPreferredC
I assume that all multilingual plone sites will be affected by this.