|
Hi John,sent through a
The purpose behind base64 is to allow binary data to be
text transfer medium. For example, if you have a JPEGpicture and want
to send it through e-mail, you have a problem. Picturesaren't made up
of letters and numbers, instead the actual bit values ofthe bytes
control what the picture looks like. However, e-mail wasdesigned for
text. If you send e-mail from a computer running ASCII toa computer
running EBCDIC, all of the bytes in the message will betranslated from
ASCII to EBCDIC -- so a picture would become a corruptmess.
actual bit
Base64 is a solution to that problem. Base64 takes the
values that make up a string of data, and converts them toto a
text-safe format. The text can then be translated toit's decoded,
ASCII/EBCDIC/Unicode, whatever, it doesn't matter. When
the data will be decoded back to the exact same binaryvalues that you
started with.platform will
That being the case, a text string encoded on an EBCDIC
CERTAINLY encode to a different string than a text stringencoded on an
ASCII platform! Of course it will, since the underlyingbit values are
different.platform,
If you take the string 'Hello' and encode it on an EBCDIC
you've encoded x'C885939396' into base64. When you decodeit on an
ASCII platform, it'll decode to x'C885939396' -- which isNOT the word
Hello in ASCII (If it did that, there'd be no point tobase64) but
rather, it's the exact same bit values you started with...
Hope you understand.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.