Pike v8.1 release 6

Method MIME.encode_words_text_remapped()


Method encode_words_text_remapped

string encode_words_text_remapped(string text, string encoding, string|function(string:string) charset, string|void replacement, function(string:string)|void repcb)

Description

This is the reverse of MIME.decode_words_text_remapped(). A single UNICODE string is provided, which is separated into fragments and transcoded to selected character sets by this function as needed.

Parameter encoding

Either "base64" or "quoted-printable" (or either "b" or "q" for short).

Parameter charset

Either the name of a character set to use, or a function returning a character set to use given a text fragment as input.

Parameter replacement

The replacement argument to use when calling Charset.encoder

Parameter repcb

The repcb argument to use when calling Charset.encoder

See also

MIME.encode_words_tokenized_remapped