base64.decodestring problem

Grzegorz Makarewicz mak at
Tue Jan 14 18:01:04 CET 2003

Skip Montanaro wrote:
>     Manuel> I'm using base64 with xmlrpclib to implement a xmlrpc server.
>     Manuel> The server is running fine, and the client under Linux/Solaris
>     Manuel> run fine too.
>     Manuel> However, the same client under Windows don't run correctly.
> May sure you open the output file in binary mode on Windows.
> Skip

Already reported as python bug #656392 - base64.decode may produce 
corrupted data on any platform.


import base64
print map(ord,base64.decodestring('   \r\n'))

should return empty string but random data is returned


More information about the Python-list mailing list