summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorKrzysztof Mazur <krzysiek@podlesie.net>2012-10-22 14:41:48 +0200
committerJeff King <peff@peff.net>2012-10-25 06:00:07 -0400
commit4a47a4ddec0d4d37e81ad63385ca287abfe90f9b (patch)
tree1c86707e877c0a1f371df35546d2c8fb991f1cdd /git-send-email.perl
parent62e0069056ed11294c29bae25df69b6518f6339e (diff)
downloadgit-4a47a4ddec0d4d37e81ad63385ca287abfe90f9b.tar.gz
git-send-email: use compose-encoding for Subject
The commit "git-send-email: introduce compose-encoding" introduced the compose-encoding option to specify the introduction email encoding (--compose option), but the email Subject encoding was still hardcoded to UTF-8. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 107e814b67..adcb4e397b 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -636,15 +636,15 @@ EOT
my $need_8bit_cte = file_has_nonascii($compose_filename);
my $in_body = 0;
my $summary_empty = 1;
+ if (!defined $compose_encoding) {
+ $compose_encoding = "UTF-8";
+ }
while(<$c>) {
next if m/^GIT:/;
if ($in_body) {
$summary_empty = 0 unless (/^\n$/);
} elsif (/^\n$/) {
$in_body = 1;
- if (!defined $compose_encoding) {
- $compose_encoding = "UTF-8";
- }
if ($need_8bit_cte) {
print $c2 "MIME-Version: 1.0\n",
"Content-Type: text/plain; ",
@@ -658,7 +658,7 @@ EOT
my $subject = $initial_subject;
$_ = "Subject: " .
($subject =~ /[^[:ascii:]]/ ?
- quote_rfc2047($subject) :
+ quote_rfc2047($subject, $compose_encoding) :
$subject) .
"\n";
} elsif (/^In-Reply-To:\s*(.+)\s*$/i) {