×
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.
Thanks for the explanation.
So when I decode the Base64 into an RPG variable, do I need to assign the correct CCSID to that RPG Variable (I would assume yes)?
When I use the IFS APIs to write this to a file on the IFS, I would assume I need to OPEN() the file with the same CCSID, correct?
That's where I'm having a bit of trouble. One of the data strings contained the "trademark" symbol (TM). Since I'm doing nothing with CCSIDs (i.e. using 37), it seems to translate that to x'99'. When I send that to the Zebra printer, it simply doesn't print (which is OK).
I just want to avoid any kind of conversion errors.
Thanks,
Greg
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Patrik Schindler
Sent: Tuesday, August 11, 2020 2:29 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Base64 decode
Hello Vernon & Greg,
Am 11.08.2020 um 18:49 schrieb Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>:
Base64 takes any byte-sequence and takes 6 bits of it at a time and uses that number as an index into a table of 64 (2*6) ASCII characters, comprising upper and lower case letters, the 10 digits, and a couple puncutation - 000000 -> A, for example.
Using this, it is possible to send binary data to any system - it does take 4 Base64 characters for every 3 bytes.
Or, explained more easily: Mangle binary data so it is represented by text (not actual language) contained within the original ASCII character set, to to be transferred to any ASCII capable system without loss of data because of different charsets, or even non 8-bit clean links. A leftover from ancient times, then called uuencode (and having a slightly different method).
Recommended reading:
https://en.wikipedia.org/wiki/Base64
https://en.wikipedia.org/wiki/Uuencoding
https://en.wikipedia.org/wiki/YEnc
:wq! PoC
PGP-Key: DDD3 4ABF 6413 38DE -
https://www.pocnet.net/poc-key.asc
As an Amazon Associate we earn from qualifying purchases.