Nuxeo mailing list archives
[CPS-devel] RemoteController and non ascii character set.
M.-A. DARCHE
madarche at nuxeo.com
Fri May 18 13:45:25 CEST 2007
Jose Luis de la Rosa Triviño a écrit :
> Hello,
>
Hello,
> I'm implementing a method in RemoteControllerTool.py that returns the
> metadata of a document. I would like to commit it to the trunk if you
> agree.
>
Yes please do if you are satisfied with the result.
> However, I have a problem. The client of xmlrpc returns an exception
> when parsing the response because the title of the documents have non
> ascii characters like á, é, etc. I have been searching around but I am a
> little lost about the solution. I have tried to return unicode strings
> but it didn't work.
>
I remember to have had exactly the same problem but I really can't
remember what I did. I just remember that it was something obvious
or that in fact it was working. I've search in past projects without
being able to find a trace. I'll give it a try next week if no one else
has helped you out.
> I have seen that xmlrpclib.py supports unicode but it seems that the xml
> parser does not.
>
All XML processors must accept the UTF-8 and UTF-16 encodings
cf. http://www.w3.org/TR/1998/REC-xml-19980210
So don't feed the parser with unicode types, but with utf-8.
Cheers,
--
Marc-Aurèle DARCHE
Open Source Enterprise Content Management (ECM) http://www.nuxeo.org/
NUXEO (Paris, France) http://nuxeo.com/
This list archive provided by Nuxeo, the
leaders of open source ECM.
Check out the Nuxeo 5 open source,
standards-based ECM project.