--On 25. März 2006 21:40:48 +0100 Yoshinori Okuji <yo@nexedi.com> wrote:
On Saturday 25 March 2006 15:56, Andreas Jung wrote:
Zope 2.7 throws a BadPickleGet, 12 exception, Zope 2.8 throws BadPickleGet, 13 and Zope 2.9 raises the described UnicodeDecodeError. I don't expect that the import functionality works for even more complex objects. So I consider the whole functionality as totally broken. The generated XML might be useful to perform any processing outside Zope but using it for re-importing it into another Zope systems definitely does _not_ work. So if the functionality should remain in Zope then it should be fixed for Zope 2.10 lately.
Here is a quick patch for this problem (against 2.9.1). There were two different problems:
- the id attributes were not generated, because the conditional was reverse.
- unlike xmllib, expat always returns Unicode data, so simply concatenating binary values generates Unicode objects with non-ascii characters.
Thanks for the patch (commited for Zope 2.8, 2.9. trunk). This solves at least the import problems on my side. Unfortunately there are no tests for export/import so fixing issues is like flying blindfolded. -aj