Decode bas64 ifs file

Discussions relating to writing software in ILE RPG (RPG IV). This includes both fixed and free format RPG.
Post Reply
sandrocarosso
Posts: 7
Joined: Mon Dec 05, 2022 1:58 pm

Decode bas64 ifs file

Post 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.
Scott Klement
Site Admin
Posts: 652
Joined: Sun Jul 04, 2021 5:12 am

Re: Decode bas64 ifs file

Post 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...
Post Reply