From: Uwe Kleine-König Date: Sun, 05 Aug 2007 20:09:08 GMT Subject: [PATCH] send-email: let sanitize_address_rfc822 do rfc2047 quoting Message-ID: <11863445481996-git-send-email-ukleinek@informatik.uni-freiburg.de> Without this patch I'm not able to properly send emails as I have a non-ascii character in my name. The former version tried to fix-up the real name part with double quotes if it includes a '.'. I removed this as rfc2047 can handle a dot, too. Signed-off-by: Uwe Kleine-König --- Hello, I already sent a similar patch that was discussed a bit[1], but was not taken. The list of allowed character was taken from Python's email package. Comparing with the former version I removed the quoting as described in the 2nd paragraph of the log and now I only test $recipient_name once. I will try to send this patch with next + this patch. I think it should work in principle, but --suppress-from is not honored. I will take a look on this issue later. Best regards Uwe [1] http://thread.gmane.org/gmane.comp.version-control.git/52093 git-send-email.perl | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index f43f92f..5785e29 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -459,16 +459,27 @@ sub unquote_rfc2047 { return "$_"; } -# If an address contains a . in the name portion, the name must be quoted. +# The name part of an address must consist only of alnum chars, space and a few +# others. +# If it contains a "forbidden" char in the name port, quote it according to +# rfc2047. sub sanitize_address_rfc822 { my ($recipient) = @_; - my ($recipient_name) = ($recipient =~ /^(.*?)\s+