Marshaling unicode WDDX

Tim Arnold tiarno at
Thu Jan 5 18:17:19 CET 2006

"isthar" <tkrzywicki at> wrote in message 
news:1136480138.708572.210190 at
> Hi !
> i am trying to serialise object which contains some unicode objects
> but looks like there is no way to do it.

hi, I'm sure you'll get better answers for the unicode part of your problem 
(I'd start with a look at the codecs module), but I wanted you to know that 
I'm using the wddx connection between Python and PHP with no problem. Here's 
the python code that writes a fairly complex data structure to the wddx 

def writeDocReport(self):
        from xml.marshal import wddx
        fileName = '%s/%s.doc.wddx' % (os.path.join(adsWeb,'jobs','wddx'),
        tmpFile  = open(fileName,'wb')

and the PHP:

function getInputData($){
        $file = "wddx/$prodName.wddx";

        if (!is_file($file)) {
                exit("<h1>Report is not available for $prodName</h1>");

        $output = wddx_deserialize(file_get_contents($file));

More information about the Python-list mailing list