|
I've written base64 encoders & decoders in RPG IV and Visual Basic. Unfortunately, I'm not allowed to share this code as I do not own it, it's owned by the company who paid me to write it. However, open-source/public-domain base64 utilities (mostly written in C) are widely available on the Internet. Here's a link to one such utility: http://www.fourmilab.ch/webtools/base64/ FWIW, base64 works just great in EBCDIC. Unlike uuencode, base64 attempts to only use invariant characters so that it'll work with any charset. Of course, if you have an ASCII file that you base64 decode on an EBCDIC machine, the result will be still be in ASCII -- that's the whole point of base64, to maintain the exact same binary values when sending a file through e-mail. If you need it to be EBCDIC, your next step might be to call the QDCXLATE API. Or simply run it through an an existing tool like CPYFRMSTMF to convert it. Good luck! On Mon, 25 Mar 2002, shahar mor wrote: > > Hi all, > > I need to encode text to base64 in order to send string to remote ascii > system. > > I also need to decode base64 to text (origin is ascii 819) > > The input text will be in ccsid 819. I downloaded some sources from the > net but all of the sources did not work well with the as400 ebcdic > environment. > > Just wondered is someone from the group solved this and dont mind to > share the code (mi,c or rpg are all welcomed) > > Thanks in advance >
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.