zopefoundation/Zope — pull request #4 by flipmcf (2013-10-29 19:04:34+00:00)
Title: make_query unicode support.

Per my email to the zope-dev mailing list "ZTUtils make_query and unicode"

Specifically, I'm building search results pagination links using CMFPlone.PloneBatch

Here's the senario:

The search form is provided a unicode string. The query is properly written as "?search_text:utf8:ustring=value"
The search will return many results.

The searchResults browser view will provide a PloneBatch object, making it very easy to display only 30 results, for example, then provide page links at the bottom of the page for the next 30 results, or whatever.

These links will contain the origional query string, but when they are built using make_query(), the result is
"?search_text=value"

What follows is unicode decode errors when the 'next' link is followed - the search_text is marshaled as a 'str', not as a 'unicode'

The bottom line is that make_query (actually, complex_marshal & simple_marshal) doesn't seem to apply the ':ustring' type prefix when creating query strings.