Z3c.form with results in a batch

As part of an addon for a client I have built a z3c.form based form to make a search query. I made this in a z3c.form to have the rendering of the form using Plone's standard z3c.form template, because the client has it customized in his Plone site to have the look and feel of all forms the same. The client wants that the search results appear batched, so I create a Batch with the results. So far so good.

But if I enter an accented char as the search value, as z3c.form converts the values to unicode, the code on ZTUtils.Zope that creates the batch links breaks with a UnicodeDecodeError because tries to convert to string that unicode value.

So my question is: is there in Plone any z3c.form based form that makes a search query and returns the results batched or has anyone any hint to make this work.

If there is no way to make this work I would need to rewrite the form manually instead of using z3c.form.

Thanks in advance,

Does anyone

You might have a look at dm.zopepatches.ztutils. It patches Zope's ZTUtils to get (among others) proper unicode support.


Thanks, with this patches I can get z3c.form and batching working without Unicode errors.

Any plans to upstream stuff from any dm.zopepatches package on any schedule?

Some dm.zopepatches have already found their way into Zope 4.0. dm.zopepatches.ztutils is covered by by https://github.com/zopefoundation/Zope/issues/619, target version Zope 5.0. Likely not all dm.zopepatches will arrive in the official Zope.

Excellent to hear, thank you. Keep the fight up.