Pike v8.1 release 6

Method MIME.encode_word()


Method encode_word

string encode_word(string|array(string) word, string encoding)

Description

Create an encoded word as specified in RFC 1522 from an array containing a raw text string and a char set name.

The text will be transfer encoded according to the encoding argument, which can be either "base64" or "quoted-printable" (or either "b" or "q" for short).

If either the second element of the array (the char set name), or the encoding argument is 0, the raw text is returned as is.

See also

MIME.decode_word()