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