|Subject:||Wishlist item: encode|
I've started using HTML::Template to generate e-mail. (No, not spam - system management reports.) It would be nice to be able to specify encoding for a region; e.g. --Boundary Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!-- TMPL_ENCODE type="qp" --> Formatted plain text version of the report <!-- /TMPL_ENCODE --> --Boundary-- The semantics are that AFTER all the variable and loop expansion is complete, but before output the region between these tags is passed thru the specified encoding function. MIME::QuotedPrint provides the function to do this; base64 may be desired by folks who generate mail with lots of international characters. Of course, this can be done by post-processing the HTML::Template's output string - but that's less efficient. Some folks might also like the corresponding <TMPL_ESCAPE> so that one can write largeish blocks of text in templates without remembering to type < instead of <... but that's just a note in passing.