Powered by QM on a Linux server
Help and Support

KnowledgeBase 00068: Base 64 Encoding

Last updated: 27 Dec 2018
Applies to: All versions
Top level index       Full Index Search Tips
Previous article     Next article

Base 64 encoding transforms a character string containing the full range of 8-bit characters into a string containing only a 64 character subset (upper and lower case letters, digits, the plus symbol and the forward slash). This encoded format is widely used to embed documents into web pages or in other cases where the data transmission protocol restricts the characters that can be sent.

The B64 Conversion Code

In QM, the B64 conversion code can be used with the OCONV() function to convert a character string into Base 64 format.

In common usage, the encoded data is divided into lines by insertion of newline characters, perhaps by use of the FOLD() function. Because the encoding process must always yield a string that is a multiple of four characters in length, there may be equals signs appended as padding.

The same conversion code used with the ICONV() function will convert a Base 64 encoded string back into an 8-bit string. Line breaks, padding characters and other invalid characters are ignored.

Related Articles


Please tell us if this article was helpful
Very     Slightly     Not at all
Email (optional)