summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Mailer.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-02-17 00:48:51 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-02-17 00:48:51 +0100
commita636e89b6851367fa4e59e1bb646d1ad8d3456a6 (patch)
tree9b8f57862b0cadba10494a98036e902cd7d7c5f9 /Bugzilla/Mailer.pm
parent1dcfd9872fe4d43785e76030a89122424ffd4a7d (diff)
parent4622fc071220abaf0defbbde7be6c0c9ecba8aa8 (diff)
downloadbugzilla-a636e89b6851367fa4e59e1bb646d1ad8d3456a6.tar.gz
bugzilla-a636e89b6851367fa4e59e1bb646d1ad8d3456a6.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/Mailer.pm')
-rw-r--r--Bugzilla/Mailer.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm
index cf494aa7f..74c9010c2 100644
--- a/Bugzilla/Mailer.pm
+++ b/Bugzilla/Mailer.pm
@@ -157,7 +157,11 @@ sub MessageToMTA {
my ($part) = @_;
return if $part->parts > 1; # Top-level
my $content_type = $part->content_type || '';
- if ($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.
+ # 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');