MIMEHEADER_ENCODE v17
Use the MIMEHEADER_ENCODE
function to convert a string into mime header format and then encode the string. The signature is:
MIMEHEADER_ENCODE(<buf> IN VARCHAR2, <encode_charset> IN VARCHAR2 DEFAULT NULL, <encoding> IN INTEGER DEFAULT NULL)
This function returns a VARCHAR2
value.
Parameters
buf
buf
contains the string to format and encode. The string is a VARCHAR2
value.
encode_charset
encode_charset
specifies the character set to which to convert the string before formatting and encoding it. The default value is NULL
.
encoding
encoding
specifies the encoding type used when encoding the string. You can specify:
Q
to enable quoted-printable encoding. If you don't specify a value,MIMEHEADER_ENCODE
uses quoted-printable encoding.B
to enable base-64 encoding.
Examples
These example use the MIMEHEADER_ENCODE
and MIMEHEADER_DECODE
functions to first encode and then decode a string:
edb=# SELECT UTL_ENCODE.MIMEHEADER_ENCODE('What is the date?') FROM DUAL;
Output
mimeheader_encode ------------------------------ =?UTF8?Q?What is the date??= (1 row)
edb=# SELECT UTL_ENCODE.MIMEHEADER_DECODE('=?UTF8?Q?What is the date??=') FROM DUAL;
Output
mimeheader_decode ------------------- What is the date? (1 row)
- On this page
- Parameters
- Examples