Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / rt / share / html / Download / CustomFieldValue / dhandler
index 4515716..aba6004 100644 (file)
@@ -61,13 +61,13 @@ unless ($OCFV->id) {
     Abort("Bad OCFV id. Couldn't find OCFV '$id'\n");
 }
 
-my $content_type = $OCFV->ContentType || 'text/plain';
+my $content_type = $OCFV->ContentType || 'text/plain; charset=utf-8';
     
 if (RT->Config->Get('AlwaysDownloadAttachments')) {
     $r->headers_out->{'Content-Disposition'} = "attachment";
 }
 elsif (!RT->Config->Get('TrustHTMLAttachments')) {
-    $content_type = 'text/plain' if ($content_type =~ /^text\/html/i);
+    $content_type = 'text/plain; charset=utf-8' if ($content_type =~ /^text\/html/i);
 }
 
 $r->content_type( $content_type );