× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi, Jim (et al):

Maybe I am "missing something" here, but, it seems to me that
you could simply write a "wrapper" to call QDCXLATE to
translate from EBCDIC to ASCII, then invoke the Base64 code,
then at the other end, convert from Base64 back to ASCII, then,
(if necessary), invoke QDCXLATE to translate it back to EBCDIC
again (if you are running on an AS/400 or iSeries or IBM mainframe
at the other end, that needs EBCDIC).

So, what's the "big deal"? Why do you want to "mess about"
trying to create a special EBCDIC-only version of Base64,
which will be a non-standard version of base64 anyway?

Perhaps someone can "step back" to look at the "big picture"
and tell me what it is you are trying to do, and why you think
you need to use base64 in the first place.

Regards,

Mark S. Waterbury

----- Original Message -----
From: "Jim Langston" <jlangston@celsinc.com>
To: <mi400@midrange.com>
Sent: Tuesday, March 26, 2002 9:56 AM
Subject: RE: [MI400] base64 encoder/decoder for EBCDIC systems


> Yes, there is a lot of C specific code in that equation.  I can tell you
> what that specific code is doing if you want.
>
> return(((cc >= 33) && (cc <= 60)) || ((cc >= 62) && (cc <= 126))) AND ...
> Basically, that is looking for any "standard" type character.  ASCII
>
> Basically, that is taking any character between ASCII 33 through 126 with
> the exception of 61 which is equals.  Equals is a special character in
> Base64.  Anything 32 and lower are control characters and not part of the
> standard displayable alphabet.
>
> if ((dd == '\n') || (dd == '\r') || (dd == '\0')) {;)
>
> \n is newline, carriage return.  \r is return.  \0 is NULL.  Looking for
end
> of line, terminated either by Carriage Return, Line Feed, or as a NULL
> terminated string.
>
> That code should be convertible to EBCDIC as long as you have an EBCDIC
> table to look at.
>
> Any more C specific questions you have I will answer if I know (or make up
> an answer if I don't <g> j/k ).
>
> You can e-mail me either through this list or directly to me at
> jlangston@celsinc.com
>
> Regards,
>
> Jim Langston
>
> -----Original Message-----
> From: shahar mor [mailto:shahar_mor@yahoo.com]
>
>  Hi,
> Thanks for the reply, i knew you that base 64 had no problem with EBDIC
(at
> least this :)), only the c source contanis many questions that are ascii
> dependent (something like  return(((cc >= 33) && (cc <= 60)) || ((cc >=
62)
> && (cc <= 126))) AND  something like this if ((dd == '\n') || (dd == '\r')
> || (dd == '\0')) {;) so we need to prot it carefully this is doable
however
> i tried to make it shorter.
> Thanks again for your reply
> _______________________________________________
> This is the MI Programming on the AS400 / iSeries (MI400) mailing list
> To post a message email: MI400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/mi400
> or email: MI400-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/mi400.
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.