Attached is a patch file. The meat of it changes
formish.forms.Form._set_request to set the request encoding rather than
constructing a UnicodeMultiDict.
Rationale: the ``GET`` and ``POST`` attributes of a WebOb request are already
UnicodeMultiDict objects, and UnicodeMultiDict objects are not meant to be
wrapped in themselves. Right now, if a schema contains a field that implies a
file upload, and the file upload has a filename that has high-order characters
in it, because the _set_request method wraps a UnicodeMultiDict inside another,
a UnicodeEncodeError will eventually be raised by WebOb, because eventually it
will try to decode an already decoded filename due to the multiple layers of
UnicodeMultiDict wrapping. This patch fixes that. Note that I have *also*
submitted a patch to Ian that indeed makes it possible to wrap a
UnicodeMultiDict inside another in this way, which will probably make it into
WebOb, but in the meantime, there's no reason to do this.
For your consideration,
- C
--
You received this message because you are subscribed to the Google Groups "ish.io" group.
To post to this group, send an email to is...@googlegroups.com.
To unsubscribe from this group, send email to ishio+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ishio?hl=en-GB.