encodeBase64 function
Base 64 encoding allows you to encode binary data from a Blob into the standard Base64 character encoding to be processed as a string/character array.
Setup
Syntax
CREATE FUNCTION BASE64(BLOB) RETURNING LVARCHAR EXTERNAL NAME 'com.informix.judrs.IfxStrings.encosdeBase64(Blob)' language java;
GRANT EXECUTE ON BASE64(BLOB) TO PUBLIC;
Usage
SELECT id, BASE64(blobColumn) AS data FROM blobTable;
id data
1
TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIHZpZGUgaGFiZW8gdmVsIGV4L
CBpbGx1bSBsYWJvcmVzIHF1byB1dC4gRXQgZXJvcyBkZWxlY3R1cyBhbnRpb3B
hbSBlc3QuIEVzc2VudCBtZWxpb3JlIGFyZ3VtZW50dW0gdmltIGVhLCBzaXQgYX
VndWUgcGxhdG9uZW0g