git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Juergen Ruehle <j.ruehle@bmiag.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Quick hack to avoid double qp encoding
Date: Wed, 10 Jan 2007 13:29:32 -0800	[thread overview]
Message-ID: <7vd55ma7ur.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <17829.20111.652000.250228@lapjr.intranet.kiel.bmiag.de> (Juergen Ruehle's message of "Wed, 10 Jan 2007 21:37:35 +0100")

Juergen Ruehle <j.ruehle@bmiag.de> writes:

> Juergen Ruehle writes:
>
> Ok, i should have also reverted the ' ' to '_' conversion, but it
> seems that send-email is to blame, because it simply copies the
> (possibly) QP encoded author address into the body of a (possibly) not
> QP encoded message.

Thanks.  I think other people would want to hack on this, so I
would make a separete sub to make it easier, like this:

diff --git a/git-send-email.perl b/git-send-email.perl
index ba39d39..8dc2ee0 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -402,6 +402,15 @@ sub make_message_id
 $cc = "";
 $time = time - scalar $#files;
 
+sub unquote_rfc2047 {
+	local ($_) = @_;
+	if (s/=\?utf-8\?q\?(.*)\?=/$1/g) {
+		s/_/ /g;
+		s/=([0-9A-F]{2})/chr(hex($1))/eg;
+	}
+	return "$_ - unquoted";
+}
+
 sub send_message
 {
 	my @recipients = unique_email_list(@to);
@@ -555,6 +564,7 @@ foreach my $t (@files) {
 	}
 	close F;
 	if (defined $author_not_sender) {
+		$author_not_sender = unquote_rfc2047($author_not_sender);
 		$message = "From: $author_not_sender\n\n$message";
 	}
 

  reply	other threads:[~2007-01-10 21:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-16  2:53 [PATCH 1/2] Suggest use of "git add file1 file2" when there is nothing to commit Shawn O. Pearce
2007-01-05 20:44 ` Michael Loeffler
2007-01-05 22:33   ` Junio C Hamano
2007-01-06  5:57     ` Junio C Hamano
2007-01-06 13:33       ` Juergen Ruehle
2007-01-06 18:17         ` Junio C Hamano
2007-01-06 23:00           ` Juergen Ruehle
2007-01-08  5:48             ` Junio C Hamano
2007-01-08 10:42               ` Juergen Ruehle
2007-01-08 20:13                 ` Junio C Hamano
2007-01-10  7:08                   ` [PATCH] Provide better feedback for the untracked only case in status output Juergen Ruehle
2007-01-10  7:17                     ` Juergen Ruehle
2007-01-10  7:29                       ` Juergen Ruehle
2007-01-10  7:39                       ` Junio C Hamano
2007-01-10 18:33                         ` Juergen Ruehle
2007-01-10 20:07                           ` [PATCH] Quick hack to avoid double qp encoding Juergen Ruehle
2007-01-10 20:37                             ` Juergen Ruehle
2007-01-10 21:29                               ` Junio C Hamano [this message]
2007-01-10 18:16                     ` [PATCH] Provide better feedback for the untracked only case in status output Michael Loeffler
2007-01-10 20:14                       ` Juergen Ruehle
2007-01-10 22:25                       ` Juergen Ruehle
2007-01-10 22:29                         ` Jeff King
2007-01-11  7:17                           ` Juergen Ruehle
2007-01-06 14:02   ` [PATCH 1/2] Suggest use of "git add file1 file2" when there is nothing to commit Juergen Ruehle
2007-01-08 19:18     ` Michael Loeffler
2007-01-09  5:42       ` Juergen Ruehle

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

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

  git send-email \
    --in-reply-to=7vd55ma7ur.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=j.ruehle@bmiag.de \
    /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.
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 NNTP newsgroup(s).