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

Re: [RFC] send-email: UTF-8 encoding in subject line

From
Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
Date
Feb 21, 2026, 13:38 UTC
Message-ID
<20260221140049.579922-1-shreyanshpaliwalcmsmn@gmail.com>
In-Reply-To
<5EDD26EE-51B6-4BE2-A7C7-E1E0991537E4@gmail.com>
Show 12 quoted lines
> > Hi,
> >
> > While using git send-email I ran into some confusion around the prompt that
> > appears when any 8-bit (non-ASCII) content is detected.
> >
> > When prompted with,
> >
> >  Which 8bit encoding should I declare [UTF-8]? y
> >  Are you sure you want to use <y> [y/N]? y
>
> Yeah, that was a bit confusing for me until I got used to it. Maybe
> saying “[default: UTF-8]” would be a small and definite improvement?

That makes sense, I tried it below. I also wondered whether, in addition to this, it might be helpful to warn on an invalid charset, and/or possibly fall back to UTF-8.

Let me know what you think.
Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
---
 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 cd4b316ddc..12d0e7e6c9 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1044,7 +1044,7 @@ sub file_declares_8bit_cte {
 	foreach my $f (sort keys %broken_encoding) {
 		print "    $f\n";
 	}
-	$auto_8bit_encoding = ask(__("Which 8bit encoding should I declare [UTF-8]? "),
+	$auto_8bit_encoding = ask(__("Which 8bit encoding should I declare [default: UTF-8]? "),
 				  valid_re => qr/.{4}/, confirm_only => 1,
 				  default => "UTF-8");
 }
--
2.53.0
Previous: Ben KnobleNext: Junio C Hamano
Message 3 of 27 in “[RFC] send-email: UTF-8 encoding in subject line”
  1. Shreyansh PaliwalFeb 20, 2026
  2. Ben KnobleFeb 21, 2026
  3. Shreyansh PaliwalFeb 21, 2026
  4. Junio C HamanoFeb 21, 2026
  5. Shreyansh PaliwalFeb 22, 2026
  6. D. Ben KnobleFeb 22, 2026
  7. Shreyansh PaliwalFeb 22, 2026
  8. Ben KnobleFeb 23, 2026
  9. Shreyansh PaliwalFeb 24, 2026
  10. Philip OakleyFeb 22, 2026
  11. D. Ben KnobleFeb 22, 2026
  12. send-email: validate charset name in 8bit encoding promptShreyansh Paliwal, Feb 24, 2026
  13. Junio C HamanoFeb 24, 2026
  14. send-email: validate charset name in 8bit encoding promptShreyansh Paliwal, Feb 24, 2026
  15. Junio C HamanoFeb 24, 2026
  16. Shreyansh PaliwalFeb 24, 2026
  17. D. Ben KnobleFeb 25, 2026
  18. Shreyansh PaliwalFeb 26, 2026
  19. send-email: validate charset name in 8bit encoding promptShreyansh Paliwal, Feb 26, 2026
  20. Junio C HamanoFeb 26, 2026
  21. Junio C HamanoFeb 26, 2026
  22. Shreyansh PaliwalFeb 28, 2026
  23. Shreyansh PaliwalFeb 28, 2026
  24. send-email: validate charset name in 8bit encoding promptShreyansh Paliwal, Feb 28, 2026
  25. D. Ben KnobleFeb 28, 2026
  26. Junio C HamanoMar 2, 2026
  27. Shreyansh PaliwalMar 3, 2026

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.