This can and should be used to encode any headers (To, From, Subject, etc)
in an email that might include text outside of the ASCII 7-bit range. Names
of people or libraries, for example, that might otherwise come out garbled.
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19546
dcc99617-32d9-48b4-a31d-
7c20da2025e4
package OpenILS::Application::Trigger::Reactor;
use strict; use warnings;
+use Encode qw/ encode /;
use Template;
use DateTime;
use DateTime::Format::ISO8601;
return $str;
},
+ # encode email headers in UTF-8, per RFC2231
+ escape_email_header => sub {
+ my $str = shift;
+ $str = encode("MIME-Header", $str);
+ return $str;
+ },
+
# strip non-ASCII characters after splitting base characters and diacritics
# least common denominator for EDIFACT messages using the UNOB character set
force_jedi_unob => sub {