classification
Title: Windows base64 Decode
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ahirreddy, eric.smith, ezio.melotti, haypo
Priority: normal Keywords:

Created on 2008-08-19 02:24 by ahirreddy, last changed 2009-02-27 00:11 by haypo. This issue is now closed.

Messages (4)
msg71400 - (view) Author: Ahir Reddy (ahirreddy) Date: 2008-08-19 02:24
I'm new to this and not quite sure how to go about posting an issue, but
I will do the best I can. In Python 2.5.2, both from python.org and
active state, all methods of decoding in base64 under Windows produce
different output than base64 decoding under UNIX (I've tested it both on
OS X and Linux, which produce the same results). I ran into this while
writing a script that downloads email and parses mime attachments which
are base64 encoded by a similar upload script. UNIX systems are able to
download the attachments and decode the base64 back to the original
attachments correctly, which I've verified with md5sum hashes. The same
script under windows produces an incorrect file. At first I was not sure
what the issue was, and I eventually wrote the raw base64 attachment to
a file. I then used a windows command line tool to decode the file and
it produced the correct output (again checked by md5sum). This leads me
to believe that something is strange with base64 under Windows. I hope
my explanation has helped some. If need be I'll upload the script so
others can replicate my results.

Ahir
msg71759 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2008-08-22 17:30
Please upload your script, or (preferably) some small test code.

I suspect the problem is related to line endings and binary versus text
files.
msg82518 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-02-20 07:07
This can be closed if Ahir doesn't provide the script.
msg82796 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2009-02-27 00:11
need more informations like a test script. reopen if you such 
script ;-)
History
Date User Action Args
2009-02-27 00:11:57hayposetstatus: open -> closed
resolution: not a bug
messages: + msg82796
nosy: + haypo
2009-02-20 07:07:56ezio.melottisetnosy: + ezio.melotti
messages: + msg82518
2008-08-22 17:30:47eric.smithsetnosy: + eric.smith
messages: + msg71759
2008-08-19 02:24:44ahirreddycreate