git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: git@vger.kernel.org
Cc: Alexey Shumkin <alex.crezoff@gmail.com>,
	Jakub Narebski <jnareb@gmail.com>,
	Alexander Gerasiov <gq@debian.org>
Subject: [PATCH 3/3] hooks/post-receive-email: set declared encoding to utf-8
Date: Fri, 2 Aug 2013 16:24:17 -0700	[thread overview]
Message-ID: <20130802232417.GE2963@elie.Belkin> (raw)
In-Reply-To: <20130802232118.GB2963@elie.Belkin>

From: Gerrit Pape <pape@smarden.org>
Date: Thu, 11 Dec 2008 20:27:21 +0000

Some email clients (e.g., claws-mail) display the message body
incorrectly when the charset is not defined explicitly in a
Content-Type header.  "git log" generates logs in UTF-8 encoding by
default, so add a Content-Type header declaring that encoding to
the emails the post-receive-email example hook sends.

[jn: also setting the Content-Transfer-Encoding so MTAs know what
 kind of mangling might be needed when sending to a non 8-bit clean
 SMTP host]

Requested-by: Alexander Gerasiov <gq@debian.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
That's the end of the series.  Thanks for reading.

 contrib/hooks/post-receive-email | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index ba93a0d8..8ee410f8 100755
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -242,6 +242,9 @@ generate_email_header()
 	cat <<-EOF
 	To: $recipients
 	Subject: ${emailprefix}$projectdesc $refname_type $short_refname ${change_type}d. $describe
+	MIME-Version: 1.0
+	Content-Type: text/plain; charset=utf-8
+	Content-Transfer-Encoding: 8bit
 	X-Git-Refname: $refname
 	X-Git-Reftype: $refname_type
 	X-Git-Oldrev: $oldrev
-- 
1.8.4.rc1

      parent reply	other threads:[~2013-08-02 23:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 23:21 [PATCH/RFC 0/3] post-receive-email: explicitly set Content-Type header Jonathan Nieder
2013-08-02 23:22 ` [PATCH 1/3] hooks/post-receive-email: use plumbing instead of git log/show Jonathan Nieder
2013-08-02 23:23 ` [PATCH 2/3] hooks/post-receive-email: force log messages in UTF-8 Jonathan Nieder
2013-08-04 14:54   ` Alexey Shumkin
2013-08-04 18:14     ` Jonathan Nieder
2013-08-05  8:45       ` Alexey Shumkin
2013-08-02 23:24 ` Jonathan Nieder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130802232417.GE2963@elie.Belkin \
    --to=jrnieder@gmail.com \
    --cc=alex.crezoff@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gq@debian.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).