Unclassified NewsBoard Code Reference

MimeEncodeWord function

Generate a MIME 'encoded word' for use in mail headers (RFC 2047)

function MimeEncodeWord ($str, $quote_plain = false, $force_b64 = false, $charset = 'ISO-8859-1');

Parameters:

str
quote_plain  –  optional, default: false
force_b64  –  optional, default: false
charset  –  optional, default: 'ISO-8859-1'

Return value:

either the plain string or an 'encoded word'

Remarks:

checks which encoding (quoted-printable/base64) is more efficient in this case and
since quoted_printable_encode is used, this function is NOT BINARY SAFE!
set ($force_b64 = true) to reliably encode binary data here

($quote_plain = true) encloses plain (unchanged) text in "" chars

Implementation file: unb_lib/mime.lib.php, line 282

© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.