Re: [PATCH] format-patch: cover letter does not respect i18n.commitencoding

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] format-patch: cover letter does not respect i18n.commitencoding

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:04

Alexey Shumkin [off-list ref] writes:
quoted hunk
diff --git a/builtin/log.c b/builtin/log.c
index 5c2af59..6a4050c 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -769,7 +769,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
 	struct shortlog log;
 	struct strbuf sb = STRBUF_INIT;
 	int i;
-	const char *encoding = "UTF-8";
+	const char *encoding =  get_commit_output_encoding();
Hmm, I have a feeling that this should use log output encoding. Am I
mistaken?

The i18n.commitencoding variable is about the internal representation in
the object [*1*] that is to be converted from the encoding of the original
e-mail message which could be different. i18n.logoutputencoding is to
externalize it [*2*].

[Footnotes]

*1* f1f909e (mailinfo: Use i18n.commitencoding, 2005-11-27)
*2* a731ec5 (t3901: test "format-patch | am" pipe with i18n, 2007-01-13)

Re: [PATCH] format-patch: cover letter does not respect i18n.commitencoding

From: Alexey Shumkin <hidden>
Date: 2016-06-15 22:52:04

Alexey Shumkin [off-list ref] writes:
quoted
diff --git a/builtin/log.c b/builtin/log.c
index 5c2af59..6a4050c 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -769,7 +769,7 @@ static void make_cover_letter(struct rev_info
*rev, int use_stdout, struct shortlog log;
 	struct strbuf sb = STRBUF_INIT;
 	int i;
-	const char *encoding = "UTF-8";
+	const char *encoding =  get_commit_output_encoding();
Hmm, I have a feeling that this should use log output encoding. Am I
mistaken?
Oooh! I made a mistake. I'm sorry

get_log_output_encoding must be used instead, yes
The i18n.commitencoding variable is about the internal representation
in the object [*1*] that is to be converted from the encoding of the
original e-mail message which could be different.
i18n.logoutputencoding is to externalize it [*2*].

[Footnotes]

*1* f1f909e (mailinfo: Use i18n.commitencoding, 2005-11-27)
*2* a731ec5 (t3901: test "format-patch | am" pipe with i18n,
2007-01-13)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help