base64.decodestring problem

Manuel Ruiz mruiz at safa.es
Tue Jan 14 10:51:29 EST 2003


Hi,

I'm using base64 with xmlrpclib to implement a xmlrpc server.
The server is running fine, and the client under Linux/Solaris run
fine too.

However, the same client under Windows don't run correctly.

I'm receiving a file coded as base64 item into a xmlrpc message.
I decode this string and save it an a file. I'm using xmlrpclib to
perform parsing of xlmrpc responses. xmlrpclib uses
base64.decodestring() to perform decoding from base64 to binary.
If I save the decode string into a file: output.write( binaryData ),
this produce a corrupted file.

However, If I save the same base64 string (without decoding) to a file
and decode it using base64.decode( fileIn, fileOut ), binary file is
generated correctly.

Anyone could help me with this issue ?


Regards
Manuel Ruiz




More information about the Python-list mailing list