RemoteController and non ascii character set.

Jose Luis de la Rosa Triviño <[email protected]> Fri, 18 May 2007 12:00:37 +0200
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
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.

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 have seen that xmlrpclib.py supports unicode but it seems that the xml 
parser does not.

The client-side exception is:

Traceback (most recent call last):
  File "remote.py", line 21, in ?
    info = proxy.getDocumentInfo(content)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1281, in _parse_response
    p.feed(response)
  File "/usr/lib/python2.4/xmlrpclib.py", line 527, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 7, 
column 26


Has anybody found this exception before? any hint about the solution?

Thank you very much!

Jose Luis.
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel