[CPS-devel] UnicodeDecodeError indexing translated title of document.

Julien Anguenot ja at nuxeo.com
Thu Jun 1 13:00:29 CEST 2006


Hi,

JoseLuis de la Rosa Triviño wrote:
> The problem was the charset "Eric IDE" used to save the .po file. I copied and pasted the translations from another application and it seems that eric doesn't manage charset well when this is done.
> I removed the translations messages from .po file, write them again by hand and everything works fine now.

oh ok.

> However, thanks for your suggestion cause I'll try it if I have the problem again.

This way is the current CPS way to do it.

> Only one thing else, what IDE do you recommend me to use for python that allows to work with svn repository? Or which is the one that you use in Nuxeo?

I'm using emacs myself  but you should consider Eclipse + pydev +
subclipse as an IDE I guess.

> Thank you very much.

you're welcome :)

	J.

> Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.
> 
> This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.
> 
> 
> 
> -----Mensaje original-----
> De: Julien Anguenot [mailto:ja at nuxeo.com] 
> Enviado el: jueves, 01 de junio de 2006 0:14
> Para: JoseLuis de la Rosa Triviño
> CC: cps-devel at lists.nuxeo.com
> Asunto: Re: [CPS-devel] UnicodeDecodeError indexing translated title of document.
> 
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.nuxeo.com/pipermail/cps-devel/attachments/20060601/da678aee/signature-0001.pgp


More information about the cps-devel mailing list

This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.