BASE64-ENCODE function Converts binary data into a Base64 character string, and returns a LONGCHAR containing the character data. The resulting LONGCHAR is in the code page specified by -cpinternal. Syntax BASE64-ENCODE ( expression ) expression A MEMPTR or RAW expression containing the binary data you want to convert. Example Following is an example using the BASE64-ENCODE function: DEFINE VARIABLE encdmptr AS MEMPTR NO-UNDO. DEFINE VARIABLE encdlngc AS LONGCHAR NO-UNDO. COPY-LOB FROM FILE "C:\myicons\test.ico" TO encdmptr. encdlngc = BASE64-ENCODE(encdmptr). COPY-LOB FROM encdlngc TO FILE "C:\myicons\testencode".
BASE64-ENCODE ( expression )
DEFINE VARIABLE encdmptr AS MEMPTR NO-UNDO.
DEFINE VARIABLE encdlngc AS LONGCHAR NO-UNDO.
COPY-LOB FROM FILE "C:\myicons\test.ico" TO encdmptr.
encdlngc = BASE64-ENCODE(encdmptr).
COPY-LOB FROM encdlngc TO FILE "C:\myicons\testencode".