@matheusbsbs / matheus-bagliano / commits / 0a7f448355
Fork 0

Correctly mark cover letters' encodings if they are not pure ASCII

If your name is, say, Üwë, you want your cover letters to appear correctly. Convince format-patch to mark it as 8-bit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Aug 10, 2009 at 18:22 UTC 0a7f448355f38b8a626ec3c120ad7118690897fe
1 file changed +4
builtin-log.c
+4
@@ -658,6 +658,10 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
658 log_write_email_headers(rev, head, &subject_start, &extra_headers,
659 &need_8bit_cte);
660
661 + for (i = 0; !need_8bit_cte && i < nr; i++)
662 + if (has_non_ascii(list[i]->buffer))
663 + need_8bit_cte = 1;
664 +
665 msg = body;
666 pp_user_info(NULL, CMIT_FMT_EMAIL, &sb, committer, DATE_RFC2822,
667 encoding);