Page 1 of 1

Decode bas64 ifs file

Posted: Mon Apr 24, 2023 2:18 pm
by sandrocarosso
Good evening everyone, through a web service I receive a pdf file encoded in base 64. I upload it to the IFS and I would like to use the "decode 64 stmf" procedure, posted by Scott in some previous posts.
The ifs file as I created it was tested on "https://www.base64decode.org/" and the pdf was output correctly.
Instead, from RPG using the "b64_decode_stmf" procedure, the error "Unable to decode character at position 288713 (char=x'25) is returned.
The ifs (base64) file ccsid is 1208.
Thanks for the support.

Re: Decode bas64 ifs file

Posted: Tue May 02, 2023 1:24 am
by Scott Klement
Char x'25' is the linefeed character in EBCDIC. But, you told us that your data is in UTF-8 (CCSID 1208). Something isn't right, here...