Reference > Functions reference > Container functions > Base64EncodeRFC
 

Base64EncodeRFC

Returns data as text in the specified Base64 format.

Format 

Base64EncodeRFC ( RFCNumber ; data )

Parameters 

RFCNumber - a number representing the IETF RFC standard of the Base64 format to use.

data - any text expression or field.

Data type returned 

text

Originated in version 

16.0

Description 

This function is similar to Base64Encode, except that you can specify the formatting to use.

For the RFCNumber parameter, use one of the following values to specify the RFC standard to follow for formatting Base64-encoded text. If you use an unrecognized value, this function defaults to RFC 4648.

 

RFCNumber

Encodes text with

1421

Maximum line length of 64 and CRLF (carriage return, line feed) line endings

2045

Maximum line length of 76 and CRLF line endings

3548

No line breaks added

4648

No line breaks added

4880

Maximum line length of 76, CRLF line endings, and an appended 24-bit CRC value

Example 1 

Base64EncodeRFC ( 4648 ; Products::Color ) returns QmxhY2s= when Products::Color is set to "Black".

Example 2 

Base64EncodeRFC ( 1421 ; Products::Container ) returns a string whose first line is the following when Products::Container is set to Help button.

iVBORw0KGgoAAAANSUhEUgAAAB8AAAARCAYAAAAlpHdJAAAAAXNSR0IArs4c6QAA

Each 64-character line ends with carriage return and line feed characters.

Related topics 

Base64Decode function

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas