[Python-3000] base64 - bytes and strings (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jul 31 03:33:43 CEST 2007
- Previous message: [Python-3000] base64 - bytes and strings
- Next message: [Python-3000] base64 - bytes and strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Terry Reedy wrote:
On the contrary, to me, the point of base64 is to encode bytes into a subset of bytes more or less guaranteed to not get mangled during transport.
Yes, and the way it goes about it is to map the binary data to a sequence of characters, the reasoning being that most such channels can at least encode those characters somehow, because they're designed for the purpose of sending text.
That these safe bytes correspond to ascii chars
They only correspond to ASCII character codes when the channel in question is designed to transmit text encoded in ASCII. If the channel were designed to transmit text encoded in EBCDIC or some other way, then ASCII codes would likely get mangled just as badly as raw binary data.
-- Greg
- Previous message: [Python-3000] base64 - bytes and strings
- Next message: [Python-3000] base64 - bytes and strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]