[PATCH] mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>, <gitster@...>
Date: Monday, July 23, 2007 - 8:03 pm

For some reason, I got this error message.  Maybe it does not make sense,
but then we should not really try to convert the text when it is not
necessary.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---

	This bit me when I tried to apply the most recent Japanese 
	translation patch to git-gui-i18n.

 builtin-mailinfo.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index a37a4ff..b4f6e91 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -529,6 +529,8 @@ static void convert_to_utf8(char *line, const char *charset)
 			return;
 	}
 
+	if (!strcmp(metainfo_charset, charset))
+		return;
 	out = reencode_string(line, metainfo_charset, charset);
 	if (!out)
 		die("cannot convert from %s to %s\n",
-- 
1.5.3.rc2.32.g35c5b-dirty

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] mailinfo: fix 'fatal: cannot convert from utf-8 to u..., Johannes Schindelin, (Mon Jul 23, 8:03 pm)