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

[PATCH] git-send-email: add rfc2047 quoting for "=?"

From
KMKrzysztof Mazur <krzysiek@podlesie.net>
Date
Oct 24, 2012, 21:28 UTC
Message-ID
<1351114109-16310-1-git-send-email-krzysiek@podlesie.net>
In-Reply-To
<20121024210826.GA23562@shrek.podlesie.net>

For raw subjects rfc2047 quoting is needed not only for non-ASCII characters, but also for any possible rfc2047 in it.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
---
Oops, this ugly Subject was generated by git format-patch (both 1.8.0
and km/send-email-compose-encoding).
 git-send-email.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index eb1b876..cfd20fa 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -908,7 +908,7 @@ sub is_rfc2047_quoted {
 sub subject_needs_rfc2047_quoting {
 	my $s = shift;
 
-	return ($s =~ /[^[:ascii:]]/);
+	return ($s =~ /[^[:ascii:]]/) || ($s =~ /=\?/);
 }
 
 sub quote_subject {
-- 
1.8.0.rc0.30.g72615bf
Previous: Krzysztof MazurNext: Jeff King
Message 6 of 12 in “git-send-email: skip RFC2047 quoting for ASCII subjects”
  1. git-send-email: skip RFC2047 quoting for ASCII subjectsKrzysztof Mazur, Oct 24, 2012
  2. Jeff KingOct 24, 2012
  3. Krzysztof MazurOct 24, 2012
  4. Jeff KingOct 24, 2012
  5. Krzysztof MazurOct 24, 2012
  6. git-send-email: add rfc2047 quoting for "=?"Krzysztof Mazur, Oct 24, 2012
  7. Jeff KingOct 25, 2012
  8. Jeff KingOct 25, 2012
  9. Jeff KingOct 25, 2012
  10. Krzysztof MazurOct 25, 2012
  11. Jeff KingOct 25, 2012
  12. Krzysztof MazurOct 25, 2012

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.