|
Question:
Do I convert EBCDIC "Hello" to ASCII using QASCII
translation table then encode the results to Base64?
Or do I need "Hello" in ASCII stored on the System i
Or are these really the same thing?
I think (I have tried so many different things) I tried to
translate "ABCDEFGH" to ASCII using translation table QASCII
then ran the results through the Base64 conversion, I still
got a different value then the Web Decoding came up with???
I am so confused!!
John
-----Original Message-----
From: Charles Wilt [mailto:charles.wilt@xxxxxxxxx]
Sent: Thursday, November 06, 2008 2:20 PM
To: Midrange Systems Technical Discussion
Subject: Re: Base64 question
And so, if whoever is going to do the decode is expecting
ASCII, then your
RPG program first needs to convert the EBCDIC to ASCII and
then do the
base64 encoding.
Charles
On Thu, Nov 6, 2008 at 1:39 PM, Scott Klement
<midrange-l@xxxxxxxxxxxxxxxx>wrote:
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.
This is the Midrange Systems Technical Discussion
(MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
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.