Le 13/01/11 14:02, Wichert Akkerman a écrit : > On 1/13/11 14:01 , Godefroid Chapelle wrote: >> >> >> Le 13/01/11 12:07, Wichert Akkerman a écrit : >>> On 1/13/11 12:04 , Godefroid Chapelle wrote: >>>> Hi, >>>> >>>> I have fixed an exportimport bug on branch 2.2 : see tests in revision >>>> 119560. >>> >>> Aren't you risking double encoding now? That patch looks like it makes >>> things worse, not better. >> >> I am not sure I understand what you mean. >> >> I did try the patch on one of my sites where export was raising an >> exception. Export did work and the files produced make sense to me. >> >> In the branch, prior to apply the patch, I added tests that mimic my >> site setup and do not pass. > > But do you know why? The original code was more robust than your > version, so I am extremely curious why it was failing for you and is not > now. > > Wichert.
Reproducing the bug is extremely easy : install a bare Plone 4 site with language french (this creates content with accented characters that trigger the bug) then try an export or snapshot in portal_setup. What your comment might imply is that the creation of default content in a Plone site is the culprit, rather than the export code in CMFCore. You make me wonder if I am actually reproducing something wrong in my tests setup : am I allowed to set a unicode value in Title and Description ? The code hereunder is setting up the tests : """ ITEMS_TITLE = u'Actualit\xe9' ITEMS_DESCRIPTION = u'Actualit\xe9 r\xe9centes' for id in ITEM_IDS: site._setObject(id, _makeINIAware(id)) item = getattr(site, id) item.setTitle(ITEMS_TITLE) item.setDescription(ITEMS_DESCRIPTION) """ -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be _______________________________________________ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests