QUOTED_PRINTABLE_ENCODE v16

Use the QUOTED_PRINTABLE_ENCODE function to translate and encode a string in quoted-printable format. The signature is:

QUOTED_PRINTABLE_ENCODE(<r> IN RAW)

This function returns a RAW value.

Parameters

r

r contains the string (a RAW value) to encode in a quoted-printable format.

Examples

Before executing the example, invoke the command:

SET bytea_output = escape;

This command escapes any nonprintable characters and displays BYTEA or RAW values onscreen in readable form. For more information, see the Postgres core documentation.

This example first encodes and then decodes a string:

edb=# SELECT UTL_ENCODE.QUOTED_PRINTABLE_ENCODE('E=mc2') FROM DUAL;
Output
quoted_printable_encode
-------------------------
 E=3Dmc2
(1 row)
edb=# SELECT UTL_ENCODE.QUOTED_PRINTABLE_DECODE('E=3Dmc2') FROM DUAL;
Output
 quoted_printable_decode
-------------------------
 E=mc2
(1 row)