JoseLuis de la Rosa Triviño wrote:
> I'm creating documents programatically with this snippet:
> {{{
>
> folderProxy = context
>
> title = context.Localizer.default.gettext('title_' +
> btool.ptool.CONTENTS_ID , language)
>
Can you try out this ?
mcat = context.translation_service
mcat.changeLanguage(lang=language)
title = mcat('title_' + btool.ptool.CONTENTS_ID)
J.
> docDef = {TITLE:title, DESCRIPT:'', HIDDE:0}
>
>
>
> idFolder = btool.ptool.CONTENTS_ID
>
> docDef['id'] = idFolder
>
> folderProxy.invokeFactory(btool.util.WORKSPACE_PCONTENT_TYPE, idFolder)
>
> docProxy = getattr(folderProxy, idFolder)
>
> doc = docProxy.getEditableContent()
>
> doc.edit(docDef, docProxy)
>
> }}}
>
>
>
> As you saw the title of the document is translated before edition. My
> problem is that I get an UnicodeDecodeError when that title is indexed.
> Can anyone help me? What should I do to mend this kind of errors?
>
>
>
> The traceback of the error is:
[...]
--
Julien Anguenot | Nuxeo R&D (Paris, France)
Open Source ECM - www.nuxeo.com
CPS Platform - http://www.cps-project.org
Mobile: +33 (0) 6 72 57 57 66
signature.asc
Description: OpenPGP digital signature
_______________________________________________ cps-devel mailing list http://lists.nuxeo.com/mailman/listinfo/cps-devel
