×
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.
I get the same result in the SQL tool on V7R5.
Looks like the function systools.base64decode is returning UTF8 data but does not tell SQL that the character field has a CCSID.
So, its returned without a CCSID. 65535.
When I pass the result through hex it returns the 1208 hex values for the string.
HEX( systools.base64decode(…) )
On V7R5, when using just “values BASE64_DECODE(..)”, I’m getting back a BLOB that is appears to be the value UTF8 data as well.
I can’t even pass the value through interpret() to cast it to 1208 because the length is variable.
The only way I can get this to work in RPG is to use CCSID(*HEX) for the receiver variable.
--
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jack Woehr via RPG400-L
Sent: Tuesday, January 16, 2024 12:12 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: Jack Woehr <jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Base64Decode
Weird, I base64 encode a string using base64 in PASE or Linux and then pass
it to systools.base64decode() and I get garbage back.
I wondered if the garbage was EBCDIC, but I tried converting it and no go.
Wonder what's happening here?
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.