Gil wrote on 09/16/2021 04:13:24 PM:

> You might make your code more robust (and easier to review) by coding"
>     Const.ASCII =XRANGE( '20'X, '7E'X')XRANGE( 'A0'X, 'FE'X')
> and using CSNBXEA to compute Const.EBCDIC.  (I added the top half
> of ISO-Latin.)  What about control characters, particularly newlines?

Not relevant to what I was testing, so I didn't bother with characters
out of range.

> > CSNBXEA is very limited. z/OS provides real conversion APIs where 
> > you provide the source and destination code pages.
> 
> E.g. iconv.

Exactly. For some reason, my brain blanked on iconv.

If you are hashing something, the best way is to convert the data to the 
target code page (assuming it is even text at all), hash, and then send 
both the message and the hash as binary.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to