git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Features ask for git-send-email

From
David Woodhouse <dwmw2@infradead.org>
Date
May 2, 2006, 12:36 UTC
Message-ID
<1146573417.14059.21.camel@pmac.infradead.org>
In-Reply-To
<4fb292fa0604290630r19edd7ejf88642e33b350d1d@mail.gmail.com>
On Sat, 2006-04-29 at 15:30 +0200, Bertrand Jacquin wrote:
Show 6 quoted lines
> Could it be possible to add a features in git-send-email.perl to
> accept a differrent charset as iso-8859-1 ? I would like to send
> fr_FR.utf8 mail as I use git to manager a latex files tree which are
> written in utf8.
> 
> Any objection ?

Seems reasonable. I think we just forgot to include the Content-Type: header. This fixes it...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/git-send-email.perl b/git-send-email.perl
index ecfa347..1df75f5 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -37,7 +37,7 @@ # Constants (essentially)
 my $compose_filename = ".msg.$$";
 
 # Variables we fill in automatically, or via prompting:
-my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose,$time);
+my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose,$time,$charset);
 
 # Behavior modification variables
 my ($chain_reply_to, $smtp_server, $quiet, $suppress_from, $no_signed_off_cc) = (1, "localhost", 0, 0, 0);
@@ -58,6 +58,7 @@ my $rc = GetOptions("from=s" => \$from,
 		    "chain-reply-to!" => \$chain_reply_to,
 		    "smtp-server=s" => \$smtp_server,
 		    "compose" => \$compose,
+		    "charset=s" => \$charset,
 		    "quiet" => \$quiet,
 		    "suppress-from" => \$suppress_from,
 		    "no-signed-off-cc|no-signed-off-by-cc" => \$no_signed_off_cc,
@@ -135,6 +136,10 @@ if (!defined $smtp_server) {
 	$smtp_server = "localhost";
 }
 
+if (!defined $charset) {
+	$charset = "UTF-8";
+}
+
 if ($compose) {
 	# Note that this does not need to be secure, but we will make a small
 	# effort to have it be unique
@@ -214,6 +219,9 @@ Options:
    --cc           Specify an initial "Cc:" list for the entire series
                   of emails.
 
+   --charset      Specify a character set, if legacy character sets are
+                  used in change logs instead of UTF-8.
+
    --compose      Use \$EDITOR to edit an introductory message for the
                   patch series.
 
@@ -299,6 +307,7 @@ Subject: $subject
 Reply-To: $from
 Date: $date
 Message-Id: $message_id
+Content-Type: text/plain; charset=$charset
 X-Mailer: git-send-email @@GIT_VERSION@@
 ";
 	$header .= "In-Reply-To: $reply_to\n" if $reply_to;
-- 
dwmw2
Previous: Bertrand JacquinNext: Jakub Narebski
Message 2 of 8 in “Features ask for git-send-email”
  1. Bertrand JacquinApr 29, 2006
  2. David WoodhouseMay 2, 2006
  3. Jakub NarebskiMay 2, 2006
  4. David WoodhouseMay 2, 2006
  5. Jakub NarebskiMay 2, 2006
  6. Bertrand JacquinMay 2, 2006
  7. David WoodhouseMay 2, 2006
  8. Bertrand JacquinMay 2, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.