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

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

From
Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
Date
Feb 20, 2026, 14:50 UTC
Message-ID
<20260220145126.131651-1-shreyanshpaliwalcmsmn@gmail.com>
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

I initially assumed this was a yes/no style confirmation and answered "y", and ignored the 'which' part (this was due to my oversight). This resulted in the charset being set to "y", which later produced a subject line like,

  =?y?q?...?=

Mail clients like Gmail still displayed the message correctly, but the mailing list archive showed the raw encoded form[1].

Afterwards, I realized the prompt expects a charset name (e.g., "UTF-8") rather than a yes/no answer, and pressing enter would have selected the default (which is UTF-8).

I had also encountered this earlier when the non-ASCII character was in the message body rather than the subject, in that case the result appeared to work fine even with the mistaken input, which made the issue less obvious to me at first.

This made me wonder whether the current UX around the prompts or input validation could be improved in any way to reduce the chance of accidental input being interpreted as a charset name.

Best, Shreyansh

[1]- https://lore.kernel.org/git/20260219181154.66814-1-shreyanshpaliwalcmsmn@gmail.com/
Next: Ben Knoble
Message 1 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.