summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Mailer.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-03-15 13:50:28 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2015-03-15 13:50:28 +0100
commit2ccf81dec1fbe4e215ea47700a4e006420318621 (patch)
tree128e4d699b1018d629caf000b164a3b7f843af46 /Bugzilla/Mailer.pm
parent1d96fa1689470945545ac8e0f239357185e832a7 (diff)
downloadbugzilla-2ccf81dec1fbe4e215ea47700a4e006420318621.tar.gz
bugzilla-2ccf81dec1fbe4e215ea47700a4e006420318621.tar.xz
Bug 902395: Enforce utf8 = true for all installations and remove the utf8 parameter
r=dkl a=sgreen
Diffstat (limited to 'Bugzilla/Mailer.pm')
-rw-r--r--Bugzilla/Mailer.pm20
1 files changed, 8 insertions, 12 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm
index bcf17458f..ef75d0cf8 100644
--- a/Bugzilla/Mailer.pm
+++ b/Bugzilla/Mailer.pm
@@ -125,9 +125,7 @@ sub MessageToMTA {
# We don't recode headers that happen multiple times.
next if scalar(@values) > 1;
if (my $value = $values[0]) {
- if (Bugzilla->params->{'utf8'} && !utf8::is_utf8($value)) {
- utf8::decode($value);
- }
+ utf8::decode($value) unless utf8::is_utf8($value);
# avoid excessive line wrapping done by Encode.
local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 998;
@@ -187,18 +185,16 @@ sub MessageToMTA {
my $content_type = $part->content_type || '';
$content_type =~ /charset=['"](.+)['"]/;
# If no charset is defined or is the default us-ascii,
- # then we encode the email to UTF-8 if Bugzilla has utf8 enabled.
+ # then we encode the email to UTF-8.
# XXX - This is a hack to workaround bug 723944.
if (!$1 || $1 eq 'us-ascii') {
my $body = $part->body;
- if (Bugzilla->params->{'utf8'}) {
- $part->charset_set('UTF-8');
- # encoding_set works only with bytes, not with utf8 strings.
- my $raw = $part->body_raw;
- if (utf8::is_utf8($raw)) {
- utf8::encode($raw);
- $part->body_set($raw);
- }
+ $part->charset_set('UTF-8');
+ # encoding_set works only with bytes, not with utf8 strings.
+ my $raw = $part->body_raw;
+ if (utf8::is_utf8($raw)) {
+ utf8::encode($raw);
+ $part->body_set($raw);
}
$part->encoding_set('quoted-printable') if !is_7bit_clean($body);
}